Basic example
CommonJS
Props
| Prop | Type | Default | Description |
|---|---|---|---|
url | string | (required) | Event URL to load in the iframe (e.g. ticket or event page). |
buttonText | string | "Get Tickets" | Label for the trigger button. |
buttonStyles | string | — | Optional CSS class name(s) for the button. |
modalStyles | string | — | Optional CSS class name(s) for the modal content (the box around the iframe). |
id derived from url for styling or scripting.
With custom classes
Live demo
Try it in your browser — click “Get Tickets” to open the event in a modal. To run the demo locally:cd examples/demo && npm install && npm run dev, then open http://localhost:5173.
Peer dependency
| Package | Version |
|---|---|
| react | >= 16.8.0 |