Integrations & API

Embed Widgets

Embed event listings and ticket purchase on your own website.

4 min readUpdated 2025-01-13

When someone lands on your retreat center's website, or the page you built for a Friday night kirtan, you don't want the ticket-buying part of that visit to happen somewhere else. Embed widgets let you display BrightStar events and sell tickets directly on your own site, so a visitor can browse, pick a ticket, and check out without ever leaving your domain. That matters most at the exact moment someone is reading about your ceremony or sound bath and deciding whether to commit — a redirect to another site right then is often when momentum breaks and the tab gets closed instead. BrightStar gives you three different widget types so you can choose how much of that experience lives on your page, depending on whether you're listing many events, spotlighting one, or just need a single button.

What are the three widget types?

Each widget type is suited to a different spot on your site. The Event List Widget shows all of your events, or a filtered set of them, with search, filter, and pagination built in — the right choice for a page like your events calendar, where someone wants to browse everything you offer. Its size is responsive, meaning it auto-fits whatever container you place it in, so you don't need to measure anything. The Single Event Widget shows one event in full, including ticket selection and checkout, and is meant for a dedicated event page — say, the page describing your October yoga retreat. It's configurable in size but needs a minimum width of 300 pixels to render its ticket details legibly. The Checkout Button is the lightest option: it shows only a "Get Tickets" button, which opens the checkout modal on click. Reach for this one when you already have a page written — a blog post, an email landing page — and just need a way for people to buy without redesigning anything around it.

How do you install a widget on your site?

Installation happens entirely in your site's HTML, using a script BrightStar hosts, so there's nothing to install on your own server.

  1. 1Add a container element to the page — an empty div with an id such as #brightstar-events — at the spot where you want the widget to appear.
  2. 2Load the widget script by adding a script tag pointing to https://cdn.brightstarevents.com/widget.js.
  3. 3Call BrightStar.init, passing your container selector and your organizer slug. Add optional settings here too — theme, maxEvents, and showPastEvents — to control how the list looks and what it includes.
  4. 4For a single event instead of a list, call BrightStar.event with the container and that event's eventId, in place of BrightStar.init.

What can you customize?

BrightStar widgets carry three groups of settings. Theming controls appearance: theme can be dark, light, or auto; primaryColor accepts any hex value so you can match your brand; borderRadius adjusts how sharp or rounded the cards look; and fontFamily can inherit your site's font, use a system font, or a custom one. Behavior settings control how the widget acts rather than how it looks — openInNewTab defaults to false, so checkout opens as a modal rather than sending visitors to a new tab, while showDescription and showVenue default to visible and showOrganizer defaults to hidden. Filtering settings control which events actually appear: you can restrict a list to one category, such as retreat, to specific tags like yoga or meditation, or to a date range using dateFrom and dateTo. Combined with maxEvents and showPastEvents from installation, this means you can build a list widget that shows exactly the slice of your calendar relevant to the page it sits on — upcoming retreats only, for instance, without last month's kirtan nights cluttering the view.

How does the widget behave on different screens?

The widget changes layout depending on the visitor's screen size rather than rendering the same way everywhere. Above 768 pixels wide, it shows a grid of two to three columns, with full event cards that include images, and checkout opens inline as a modal over the page. Below 768 pixels, it switches to a single-column list of more compact cards, and checkout takes over the full screen instead of appearing as a modal. This split exists because a multi-column grid with large images that reads well on a desktop browser gets cramped on a phone, and a modal checkout can be awkward to scroll and close on a small screen — a full-screen checkout gives a visitor more room to enter ticket details without the page shifting under their thumb.

Set theme to "auto" rather than choosing dark or light yourself. The widget then follows the visitor's own system preference by respecting the prefers-color-scheme media query, so it matches whatever mode your site — and their device — is already in, without you needing to detect or switch anything manually.

Common questions

Can I sell tickets directly on my own website instead of sending people to BrightStar?

Yes. BrightStar embed widgets display events and sell tickets on your own site, so visitors can browse and purchase without leaving your domain. There are three widget types: an event list, a single event with ticket selection and checkout, and a standalone Get Tickets button that opens a checkout modal.

Read more

This works because the widget handles the entire flow inline — browsing, selecting a ticket, and paying — inside your page, rather than handing the visitor off partway through to finish elsewhere. For events like a kirtan night or retreat, where someone is already reading details on your site, avoiding that handoff means fewer people abandon the purchase before completing it.

How do I install the BrightStar widget on my site?

Add a container div, load the script from https://cdn.brightstarevents.com/widget.js, then call BrightStar.init with your container selector and organizer slug, plus options such as theme, maxEvents and showPastEvents. For a single event, call BrightStar.event with the container and the eventId instead.

Read more

The container div is just a placeholder — an empty element with an id — that tells the script where on the page to render the widget once it loads. Which function you call depends on what you're building: BrightStar.init for a whole calendar of events, or BrightStar.event for one dedicated page built around a single gathering's ticket selection and checkout.

Can the embed widget match my website's design and dark mode?

Yes. BrightStar widgets accept a theme of dark, light or auto, plus primaryColor as any hex value, borderRadius, and a fontFamily of inherit, system or a custom font. Setting theme to auto makes the widget follow your site's dark or light mode, because it respects the prefers-color-scheme media query.

Read more

Choosing auto means you don't have to detect your visitor's preference yourself or maintain two versions of the widget. Because it reads the prefers-color-scheme setting directly from the browser, the widget updates automatically if someone's system switches between light and dark, keeping it visually consistent with the rest of your site without extra code on your part.

Can I show only certain events in the embedded list?

Yes. The BrightStar event list widget supports filtering by category, such as retreat, by tags such as yoga or meditation, and by a dateFrom and dateTo range. You can also cap the number shown with maxEvents and hide past events with showPastEvents set to false.

Read more

These filters work together rather than one replacing another — you could combine a category of retreat with tags like yoga and a dateFrom set to the coming month, so the list widget shows only the specific slice of your calendar relevant to the page it sits on, rather than every event you've ever listed.

Do BrightStar widgets work on mobile?

Yes, the widgets are responsive. Above 768 pixels they render as a two to three column grid of full event cards with images and an inline checkout modal. Below 768 pixels they switch to a single-column list with compact cards and a full-screen checkout.

Read more

The breakpoint sits at 768 pixels, which roughly covers the shift from a phone or small tablet browsing in portrait to a full desktop window. Below that width, the single-column layout and full-screen checkout exist because a multi-column grid and an inline modal both become harder to read and tap accurately on a small screen.

How much space does the widget need on the page?

The BrightStar event list widget is responsive and auto-fits its container. The single event widget is configurable but needs a minimum width of 300 pixels, and the checkout button renders inline and is customizable.

Read more

Because the event list widget auto-fits its container, you don't need to calculate pixel dimensions for it — it takes the shape of whatever div you place it in. The single event widget's 300 pixel minimum exists so ticket selection and checkout details have enough room to lay out clearly, even inside a narrow sidebar.

Ready to get started?

Create your first event on EveryEvent Bangkok — it’s free.