@ripcord.io/meeting
v1.2.2
Published
A booking widget library for Ripcord.io
Downloads
240
Readme
Ripcord.io Meeting Widget
Embeddable widget and React component for scheduling meetings with Ripcord.io.
Table of Contents
Install
Via CDN:
<script src="https://cdn.jsdelivr.net/npm/@ripcord.io/meeting"></script>
Usage
Simple Usage
To get started, instantiate the Ripcord
class, passing in the ID of the Routing you want to use.
Import via CDN
<script src="https://cdn.jsdelivr.net/npm/@ripcord.io/meeting"></script>
<script>
const button = document.getElementById('open-widget');
const instance = new Ripcord({
routingId: '<your_routing_id>',
});
button.addEventListener('click', () => {
instance.open();
});
</script>
You also have the option to pass in an element, either as an HTMLElement
or a query selector string, to open the widget when clicked. This will automatically add a click event listener to the element.
<script src="https://cdn.jsdelivr.net/npm/@ripcord.io/meeting"></script>
<script>
const instance = new Ripcord({
routingId: '<your_routing_id>',
el: '#open-widget',
});
</script>
When used via the CDN, any UTM parameters in the URL will automatically be captured and sent to the Ripcord API.
API
Ripcord
The Ripcord
class provides methods to control the lifecycle of an object that can be opened and closed.
Constructor
The Ripcord
constructor accepts the following parameters:
routingId: string
The UUID of the routing that should be used to determine which team members will be assigned the new deals.el?: HTMLElement | string
The element that will open the widget when clicked. If a string is passed in, the element will be found usingquerySelector
. If not provided, the widget will be opened when theopen
method is called.productId?: string
The UUID of a product you want all new deals to be associated with. This will override the product selection by the routing.
Methods
open()
: Opens the booking modal.close()
: Closes the booking modal.destroy()
: Destroys the instance, removing all event listeners elements created by the instance. The instance cannot be used after this method is called. Does not remove the element passed in the constructor.
UTM Parameters
When using the widget via the CDN, any UTM parameters in the URL will automatically be captured and sent to the Ripcord API.