Code Component
RecommendedCreate a native Framer code component with configurable properties. This integrates directly with Framer's component system.
In Framer, open your project
Open the Framer project where you want to add ticket sales.
Create a new Code Component (click + → Code)
In the Assets panel (left sidebar), click + and select Code. Framer will create a new code file for your component.
Paste this React component code
Replace the default code with the TicketWave component:
import { useEffect, useRef } from "react"
export default function TicketWave({ client, event, theme = "light" }) {
const ref = useRef(null)
useEffect(() => {
const existing = document.querySelector('script[src*="ticketwave"]')
if (!existing) {
const s = document.createElement("script")
s.src = "https://www.ticketwavehq.com/widget/ticketwave.js"
s.async = true
document.body.appendChild(s)
}
}, [])
return (
<div
ref={ref}
id="ticketwave-widget"
data-client={client}
data-event={event}
data-theme={theme}
data-api-url="https://www.ticketwavehq.com/api"
style={{ width: "100%", minHeight: 400 }}
/>
)
}Add component properties for client and event slugs
Framer auto-detects the component props and exposes them in the Properties panel. Set your venue slug and event slug there.
Drag the component onto your page
Find your new TicketWave component in the Assets panel and drag it onto the canvas. Configure the props in the right-hand Properties panel, then publish.
What it looks like in Framer
Assets
Layers
Properties
client
event
theme
Embed HTML
A simpler alternative if you prefer not to create a Code Component. Uses Framer's built-in Embed element.
Add an Embed element from the Insert menu
In the left panel, click the Insert menu and search for Embed. Drag it onto your page.
Paste the standard embed code
Replace the placeholder slugs with your actual venue and event slugs from the TicketWave dashboard:
<!-- TicketWave Ticket Widget -->
<div id="ticketwave-widget"
data-client="YOUR-VENUE-SLUG"
data-event="YOUR-EVENT-SLUG"
data-api-url="https://www.ticketwavehq.com/api"
style="max-width: 480px; margin: 0 auto;">
</div>
<script src="https://www.ticketwavehq.com/widget/ticketwave.js" async></script>Tip: The Code Component method is preferred because it integrates with Framer's properties system, making it easy to configure without editing code each time.
Customisation Options
When using the Code Component, pass these as props. When using the Embed method, add them as data attributes on the container div.
| Attribute | Type | Default | Description | Example |
|---|---|---|---|---|
data-client | string | Required | Your venue slug from the dashboard | "my-venue" |
data-event | string | Required | Event slug from the event detail page | "summer-party-2026" |
data-api-url | string | https://www.ticketwavehq.com/api | API endpoint (rarely needs changing) | "https://www.ticketwavehq.com/api" |
data-theme | "light" | "dark" | "light" | Widget colour scheme | "dark" |
data-accent-color | hex | "#000000" | Primary accent colour for buttons | "#FF6B4A" |
data-button-text | string | "Buy Tickets" | CTA button label | "Book Now" |
data-locale | string | "en" | Language (en, es, pt, el, fr, de, it) | "es" |
data-show-description | "true" | "false" | "true" | Show the event description | "false" |
data-show-venue | "true" | "false" | "true" | Show venue information | "false" |
Troubleshooting
Code Component not rendering in Framer preview
- Framer's canvas preview may not execute all scripts. Publish your site and test on the live URL.
- Make sure the component properties (client and event) are filled in via the Properties panel on the right.
- Check the browser console for errors — the component requires valid venue and event slugs.
Script loading multiple times
- The code component checks for an existing script before loading. If you have multiple instances, the script is loaded only once.
- If using the Embed method alongside a Code Component, make sure only one includes the script tag.
Widget height too small
- The Code Component sets a minimum height of 400px. You can adjust this in the component code or via the Properties panel.
- If using the Embed method, set a fixed height on the embed element using Framer's layout controls.
Styling does not match my Framer site
- Pass the theme prop to the Code Component ("light" or "dark") to match your site's background.
- The widget renders in a shadow DOM, so your Framer styles will not affect it.
- Use data-accent-color to match your brand colours.
Frequently Asked Questions
Does this work on the free Framer plan?
The Code Component and Embed methods work on all Framer plans. However, custom domains require a paid plan. The widget itself works regardless of plan.
Can I use Framer's component properties to configure the widget?
Yes. When you create a Code Component, Framer automatically generates a Properties panel for the component's props. You can set client, event, and theme directly from the Framer UI without editing code.
Will the widget work with Framer Motion animations?
Yes. The widget loads independently. You can wrap the component in Framer Motion elements for entrance animations without affecting the widget's functionality.
Can I embed multiple events on the same page?
Yes. Add multiple instances of the Code Component, each with a different event prop. The script loads only once regardless of how many widgets are on the page.
What is the difference between Code Component and Embed?
Code Components are React-based and integrate natively with Framer's component system, including props and the Properties panel. The Embed method uses a raw HTML iframe and is simpler but offers less integration with Framer's tooling.
Explore other integrations
Ready to sell tickets from Framer?
Create your free account, grab the embed code, and start selling in under two minutes.