Basic Usage (JS SDK)
If you want an easier experience, you can just add the tinyDialog script tag to your website (see the HTML Installation Guide). If you have problems, contact us via hello@tinyDialog.com.
Install tinyDialog JavaScript library
Use the package-manager of your choice to install the library:
The library offers TypeScript typings for your convenience.
Register buttons & containers that use data-attributes
By calling bindSurveysWithDataAttributes() you can hook-up buttons that have a data-tinydialog-openwidget data-attribute and containers that have a data-tinydialog-widgetcontainer data-attribute.
Code Example:
Manually Open a Widget
You can use showWidget(<surveyId>) to trigger the opening of a floating tinyDialog widget from your code.
Code Example:
Instantiate a Survey into a specific Container
You can use loadSurvey(<surveyId>, <additionalSettings>, <targetContainer>) to load a survey as a child of an existing html element.
Code Example:
Last updated on
