React Typeform Embed
A React wrapper for Typeform Embed SDK.
Usage
First install the package
There are five different embed types that you can import as components.
- Widget
- Popup
- Slider
- Sidetab
- Popover
You need to provide the form id as id prop.
You can get the id from the public URL of your form:
https://form.typeform.com/to/<form-id>
Or from the admin panel URL:
https://admin.typeform.com/form/<form-id>
You can also use any other option (except container
) and callback from the official SDK passing them as props. Find more info here:
Widget
With the widget embed type you can embed your form inline, in a DOM element.
Popup and Slider
With the popup and slider embed types you can embed the form in a modal. You need to pass as children the element/s that will open the modal when clicked.
Sidetab and Popover
These other modal embed types work exactly as the Popup component but, since they are already visible and clickable, passing children element/s is optional.
See the source for more examples.
Demo
See a live demo, or run:
Alternatives
- Official Typeform React Embed Library