Theme every Sessions embed with CSS custom properties. Set them once on `<sessions-context>` (or `:root`) to brand all embeds on the page, or on a single element to theme just that one. Each `--sessions-*` property maps to the embed’s internal design tokens, so a handful of values restyle the whole widget. All are optional — unset properties fall back to a neutral default that adapts to `--sessions-color-scheme`. Typography is the exception to “neutral default”: embeds inherit their type from your page and never load a font of their own, so a widget looks native wherever you drop it.
Example theme
sessions-context {
--sessions-color-scheme: light;
--sessions-surface: #ffffff;
--sessions-surface-hover: #f4f4f8;
--sessions-border: #e2e2e8;
--sessions-text: #1a1a2e;
--sessions-text-subdued: #71717a;
--sessions-accent: #6366f1;
--sessions-action-text: #ffffff;
}Scheme
Light or dark base for unstyled fallback chrome.
| Property | Description | Example |
|---|---|---|
--sessions-color-scheme | `light` or `dark`. Sets the embed’s base color scheme. | light |
Surfaces
Background layers, from the page surface up to hover fills.
| Property | Description | Example |
|---|---|---|
--sessions-surface | Primary background behind the embed’s content. | #ffffff |
--sessions-surface-hover | Hover/active background for interactive rows + cells. | #f4f4f8 |
--sessions-surface-muted | Subtle background for secondary panels + empty states. | #fafafa |
--sessions-border | Hairline colour for dividers, grid lines, and outlines. | #e2e2e8 |
Text
Foreground colours for primary and secondary copy.
| Property | Description | Example |
|---|---|---|
--sessions-text | Primary text colour. Also seeds the loading skeleton. | #1a1a2e |
--sessions-text-subdued | Secondary text — captions, weekday labels, metadata. | #71717a |
Accent
The brand colour used for primary actions + today markers.
| Property | Description | Example |
|---|---|---|
--sessions-accent | Primary action / highlight colour (buttons, today dot). | #6366f1 |
--sessions-action-text | Text/icon colour rendered on top of the accent colour. | #ffffff |
--sessions-focus | Focus-ring colour for keyboard navigation. | #6366f1 |
Status
Semantic colours for positive + destructive states.
| Property | Description | Example |
|---|---|---|
--sessions-positive | Success / available state (e.g. open spots). | #059669 |
--sessions-destructive | Errors + destructive actions (e.g. cancel). | #dc2626 |
Typography
Embeds never load a font — bringing one is your page’s job. They inherit typography from the element they sit in, so a widget looks native wherever you drop it, including in a webfont your page already loads. Override these only when you want the embed to read differently from its surroundings.
| Property | Description | Example |
|---|---|---|
--sessions-typography-family | Font stack for embed text. Unset means inherit from your page. | "Inter", system-ui, sans-serif |
--sessions-typography-heading-family | Font stack for headings. Falls back to `--sessions-typography-family`. | "Fraunces", Georgia, serif |
--sessions-typography-mono-family | Fixed-width stack for masked card digits, codes, and reference numbers. | ui-monospace, Menlo, monospace |
Use the font your site already uses (the default)
Do nothing. Every embed inherits typography from the element it sits in, so it picks up whatever your page has set on `body` — including a webfont you load yourself. An `@font-face` declared in your page applies inside the embed’s shadow DOM, so a font you already ship needs no extra wiring at all.
Point the embed at a font you load yourself
If the embed sits somewhere that doesn’t inherit the right font — inside a card with its own type, or on a page where you want the widget to read differently — name your stack explicitly. You load the font; we render in it. Set the heading property too if your headings use a second face.
/* Your own @font-face, in your own stylesheet. */
@font-face {
font-family: "Söhne";
src: url(/fonts/soehne.woff2) format("woff2");
font-display: swap;
}
sessions-context {
--sessions-typography-family: "Söhne", system-ui, sans-serif;
--sessions-typography-heading-family: "Söhne Breit", "Söhne", sans-serif;
}If the embed isn’t picking up your font
Almost always one of three things. (1) Your `@font-face` is declared inside another shadow root rather than in the page document — font faces are document-scoped, so move it to a page-level stylesheet. (2) You named a family in `--sessions-typography-family` that nothing on the page actually loads, so it falls back; check the Network tab for the font file. (3) Something between your `body` and the embed resets `font-family`, so there is nothing useful to inherit — name your stack explicitly. In every one of these cases the embed renders in a fallback stack rather than breaking.
Corners
The corner language, as a five-step scale plus a per-component override for anything you want shaped differently. Set `--sessions-radius-base` alone and the rest of the embed follows it — including the round controls, which is what makes a square-cornered brand come out square everywhere instead of leaving circular radio dots and pill toggles behind.
| Property | Description | Example |
|---|---|---|
--sessions-radius-xs | Smallest step — inline code, swatches, stepper buttons, thin indicator bars. | 4px |
--sessions-radius-sm | Small step — icon buttons, date cells, day-picker badges, nested rows. | 8px |
--sessions-radius-base | The headline value, and the one to set if you only set one. Cards, panels, grids and the schedule frame use it, and every derived corner below is measured from it. | 12px |
--sessions-radius-lg | Large step — banners, menus, popovers, toasts. | 16px |
--sessions-radius-xl | Largest step — sheets and full-height panels. | 24px |
--sessions-button-border-radius | Buttons. Defaults to a full pill rather than tracking the scale, so set it explicitly if you want buttons to match your cards. | 999px |
--sessions-field-border-radius | Text inputs, selects, number and date fields. Defaults to `--sessions-radius-base`. | 12px |
--sessions-card-border-radius | Cards and raised panels. Defaults to `--sessions-radius-base`. | 12px |
--sessions-sheet-border-radius | The registration / booking / checkout sheet. Defaults to `--sessions-radius-xl`. | 24px |
--sessions-banner-border-radius | Status banners and inline notices. Defaults to `--sessions-radius-lg`. | 16px |
--sessions-control-border-radius | Round controls: radio dots, toggle tracks and thumbs, checkboxes, selection indicators, spinner dots. Defaults to `min(9999px, base × 8)` — a circle at any normal scale, and flat once you take `--sessions-radius-base` to `0`. Set it outright to keep circular controls under an otherwise square brand (or the reverse). | 999px |
--sessions-tag-border-radius | Tags, badges and chips. Defaults to `--sessions-control-border-radius`. | 999px |
--sessions-avatar-border-radius | Avatars and icon tiles in their squircle shape. Defaults to `min(22%, base × 8)`, so it keeps the iOS-style curvature until the brand squares off. | 22% |
--sessions-menu-border-radius | Menus and popovers. Falls back to `--sessions-radius-lg`, or `1.1rem` when the scale is untouched. | 18px |
--sessions-image-border-radius | Media — gallery thumbnails, carousel images, activity photos. Falls back to `--sessions-radius-sm`, or `0.5rem` when the scale is untouched. | 8px |
--sessions-toast-border-radius | Toasts. Falls back to `--sessions-radius-lg`, or `1.1rem` when the scale is untouched. | 18px |
Square corners everywhere
One value does it. Taking the base step to `0` flattens the derived corners with it, so the round controls square off too — that is the whole point of deriving them rather than hard-coding a pill.
sessions-context {
--sessions-radius-xs: 0;
--sessions-radius-sm: 0;
--sessions-radius-base: 0;
--sessions-radius-lg: 0;
--sessions-radius-xl: 0;
/* Buttons do not track the scale — flatten them explicitly. */
--sessions-button-border-radius: 0;
}Square chrome, round controls
The derived defaults are only defaults. Pin `--sessions-control-border-radius` and the radio dots and toggles stay circular no matter how flat the rest of the scale goes.
sessions-context {
--sessions-radius-base: 0;
--sessions-button-border-radius: 0;
--sessions-control-border-radius: 999px;
}Brand gradient
Optional gradient used in avatar tiles and pass/membership cards. Set the single `--sessions-brand-gradient` for a solid, or the from/to pair for a true gradient.
| Property | Description | Example |
|---|---|---|
--sessions-brand-gradient-from | Start colour of the brand gradient. | #6366f1 |
--sessions-brand-gradient-to | End colour of the brand gradient. | #8b5cf6 |
--sessions-brand-gradient-angle | Gradient angle. | 135deg |