---
title: "Ticket Widget"
description: "Sell Sway tickets on your own website with the ticket widget in the Sway web app: set its look once for a promoter, artist or venue page, preview it live, copy the embed code or a plain iframe, and see what buyers get and where widget sales show up."
canonical_url: "https://www.sway.events/en/docs/web-app/tickets/ticket-widget"
---
# Ticket Widget

> Sell Sway tickets on your own website with the ticket widget in the Sway web app: set its look once for a promoter, artist or venue page, preview it live, copy the embed code or a plain iframe, and see what buyers get and where widget sales show up.

The ticket widget puts your ticket shop on your own website: the event, its ticket
types with their prices, a quantity picker and a **Get tickets** button, inside a
frame on your page. Payment still happens on Sway's checkout, so coupons, access
codes, fees and the ticket email work exactly as on the event page. You set the
widget's look once, on the **Widget** tab of a page's **Tickets** screen, and it
applies to every event paid into that page, on every site that already shows it.

---

## Open the screen

1. Open the promoter, artist or venue page that receives the ticket money.
2. Go to **Tickets** in the menu, then the **Widget** tab.

The **Tickets** screen needs the permission to manage ticketing on that page;
without it, the row says you have no access. The look belongs to the page paid for
the event (the one linked on the event's **Payouts** tab), the same page whose
ticket **Templates** the event prints with.

---

## Set the look

The left card holds the theme:

- **Appearance**: **Follow the visitor**, **Light** or **Dark**. **Follow the
visitor** uses light or dark depending on the visitor's device setting.
- **Colours**: **Button colour**, **Background**, **Text** and **Borders**. Pick a
colour or type a hex code such as `#ff4d6d`. Leave one empty to keep the default
of the light or dark appearance. The text on the button switches between black
and white by itself, so it stays readable on your colour.
- **Font**: **System**, **Rounded**, **Serif**, **Monospace** or **Condensed**.
These are fonts already on the visitor's device: the widget loads no font file.
- **Corner radius**: from 0 (square) to 24 pixels.

Click **Save** in the bar at the bottom of the screen. **Discard** puts back what
was saved, and **Back to default** empties every field so the next save returns
the widget to Sway's default look.

<note>

Sites showing the widget pick up a saved change within a minute. Nothing needs to
change on your website: the embed code does not carry the colours.

</note>

---

## Preview and copy the code

The **Preview** card on the right is the real widget, drawn with your unsaved
changes, so you can try colours before saving. A promoter picks what to embed with
**One event** or **All upcoming events**; an artist or a venue embeds one event at
a time. The menu under it chooses the event, among the page's upcoming published
events.

Below, two blocks give the code for that choice, each with a **Copy** button:

- **Embed code**: a short block to paste where the widget should appear. It sizes
itself to its content and, if it cannot load, leaves a plain link to the event's
tickets in its place.
- **Plain iframe**: for site builders that do not accept scripts. It keeps a fixed
height, so leave room for your longest ticket list.

When the page has no upcoming published event, the preview says so and the code
appears with the first one.

---

## Put it on your site

Paste the **Embed code** into an HTML block of your website, where the widget
should sit. It works on any page that accepts HTML: a hand-written site,
WordPress, Webflow, Squarespace or Wix (in a custom code or embed block).

The block reads `data-lang` for the language of the widget, in the language of
your admin by default. Developers can change more with a few attributes, listed in
[Website integration](https://www.sway.events/en/docs/api/integrations#ticket-widget): open the checkout
in the same tab, pass a coupon, show more events in a list.

<tip>

Put the widget on a page that loads over `https://`. Most site builders already do.

</tip>

---

## What buyers see

The widget shows the event's name, date and venue, then each public ticket type
with its price, fees included when they apply to each ticket. A ticket type that is
sold out, not on sale yet or no longer on sale shows that instead of the quantity
picker, and **Few left** appears when stock runs low. The widget never shows how
many tickets remain.

A ticket type's description sits behind a **Details** control the buyer can open, unless **Show ticket details** is on in the event's settings.

The buyer picks quantities and clicks **Get tickets**. Sway's ticket page opens in
a new tab with the same tickets already selected, and the buyer finishes there:
email, coupon or access code, tip if you offer one, then payment on Stripe. A past
event, or an event that does not sell through **Sway Tickets**, shows a plain link
to its Sway page instead.

---

## Follow widget sales

Orders placed through the widget are ordinary orders: they appear on **Orders**
and pay out like the others. The widget tags them with the campaign medium
`sway_widget` and, as source, the address of the site the widget sits on. On the
event's **Insights**, the **Campaigns** tab groups them that way, so you can see
what each site sold. See [Insights](https://www.sway.events/en/docs/web-app/audience/insights#campaigns).

---

## From an event

An event has the widget too: open the event, go to **Tickets**, then the
**Widget** tab, the last one. It shows that event's widget with the saved look and
the two blocks of code for it, ready to copy. The look itself is not edited there:
it comes from the page the event is paid into, under **Tickets** > **Widget** on
that page. The widget only shows once the event is published. The tab appears to
people who can manage the event's ticketing.

---

## Where the rest lives

- [Ticket Types](https://www.sway.events/en/docs/web-app/tickets/ticket-types): what the widget lists.
- [Ticket Design](https://www.sway.events/en/docs/web-app/tickets/ticket-design): what the PDF ticket looks like.
- [Website integration](https://www.sway.events/en/docs/api/integrations): the widget options, and the Public API for a fully custom ticket page.


## Sitemap

See the full [sitemap](https://www.sway.events/sitemap.md) for all pages.
