call1800 is an embeddable element that allows your users make calls to 1800 numbers completely free.
You can see this project in action at https://www.call1800.org
npm install call1800
<link rel="stylesheet" href="<ADD_LINK_HERE>">
<script src="<ADD_LINK_HERE>"></script>
-
Add
dist/main.css
to your styles. -
Initialize dialpad with Javascript.
import Dialpad from 'call1800'; // if you used CDN Dialpad class is available at window.Dialpad
const dialpad = new Dialpad();
dialpad.render();
Creates dialpad instance with options object. You can omit options
if defaults
values are suitable for your use case.
Available options:
Option | Description | Default value | Data type |
---|---|---|---|
closed | Changes initial state of the dialpad. If true - dialpad will be collapsed by default | false | Boolean |
Example:
const dialpad = new Dialpad({
closed: true,
});
Renders dialpad on page.
Starts a call to number
. number
must be a String that starts with 18xx and
exactly 11 characters long.
Stops active call.
Collapse or open dialpad.
Opens dialpad.
Collapses dialpad.