Skip to content

Theming ​

The widget exposes CSS custom properties so you can match your brand without touching any widget source code. v1's --primary-color, --primary-hover, --text-primary, --border-color, --background-light, --font-family, --font-size-base and --font-weight work as before. v1's --border-radius, --box-shadow, --text-secondary, --line-height and the status colours (--success-color, --error-color, --warning-color, --secondary-color, --loading-color) are not read by v2: use --radius, --shadow and --text-muted. The v1 default for --border-color was a dark grey (#666666); v2's is a light one, so an override copied from v1 makes every border dark.

Stylesheet ​

The recommended approach — add a rule to your existing stylesheet targeting the booksea-widget element:

css
booksea-widget {
  --primary-color: #1a6b3c;
  --font-family: 'Inter', sans-serif;
  --font-display: 'Fraunces', serif; /* question titles and prices */
  --radius: 12px;
  --max-width: 640px;
}

CSS custom properties ​

PropertyDefault (light)Description
--primary-color#004963Buttons, selection, links
--primary-hoveraccent, 14% darkerHover state for primary elements
--on-primary-color#ffffffText on the accent colour
--text-primary / --text-muted#14212b / #5f6e76Main and secondary text
--surface-color#ffffffThe card
--background-light#f3f7f8Fields, steppers, days
--border-color#e3e9ebBorders and dividers
--peak-color#b35c00Dot on peak-season days in the calendar
--font-familysystem UIWidget font stack
--font-displaythe font familyQuestion titles and prices
--font-size-base15pxBase font size
--font-weight400Default font weight
--radius8pxCorner radius
--border-width1pxWidth of the borders on rows, fields and dividers
--gap16pxSpacing
--shadowsoftCard shadow
--max-width560pxWidest the widget grows
--min-height560pxKeeps the height steady between screens

Dark mode ​

Set theme="dark" (or theme="auto" to follow the visitor's system) on the element. Dark mode has its own defaults, and any property you set wins in both themes.

Deeper changes ​

For changes the properties don't cover, style the exposed parts with ::part(): card, top, title, rows, row, recap, bar, button.

css
booksea-widget::part(button) {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

The Stripe payment form follows --primary-color, --font-family and the theme.

Inline styles ​

For quick tests or one-off overrides, variables can also be set directly on the element:

html
<booksea-widget
  company-slug="your-slug"
  style="--primary-color: #1a6b3c; --font-family: 'Inter', sans-serif;"
></booksea-widget>