Styling

Restyle Sunboard's checklist, tours, and hotspots to match your product by overriding CSS variables.

Sunboard ships a complete default theme in @sunboard/react/styles.css, so the checklist, tours, and hotspots look polished the moment you install. You restyle them by overriding CSS custom properties — there's no config file and no component theming API to learn.

You don't need to do anything

The defaults are production-ready. Override variables only where you want Sunboard to match your brand. sunboard init appends a starter block of these variables to your global stylesheet when it can find one — if it didn't (every project structures CSS differently), just add the overrides yourself as shown below.

How it works

Every Sunboard surface reads its colors, font, and radius from --sunboard-* variables defined on :root. To customize, declare the variables you want to change in a stylesheet that loads after @sunboard/react/styles.css, so your values win the cascade. sunboard init imports the Sunboard stylesheet first for exactly this reason — your global CSS comes after it.

your global stylesheet
:root {
  /* Shared across all Sunboard UI */
  --sunboard-font: "Inter", system-ui, sans-serif;
  --sunboard-radius: 12px;

  /* Checklist card + buttons */
  --sunboard-checklist-background: white;
  --sunboard-checklist-foreground: #111827;
  --sunboard-checklist-border: #e5e7eb;
  --sunboard-checklist-primary: #2563eb;
  --sunboard-checklist-primary-foreground: white;
  --sunboard-checklist-success: #16a34a;
}

That's the common case — most teams only change the font, the corner radius, and the primary color to match their product.

Full variable reference

All variables are optional; any you don't set fall back to the shipped default.

Shared

VariablePurpose
--sunboard-fontFont family for all Sunboard UI
--sunboard-radiusCorner radius for cards, buttons, and tooltips

Checklist

VariablePurpose
--sunboard-checklist-backgroundCard surface
--sunboard-checklist-foregroundCard text
--sunboard-checklist-borderCard border
--sunboard-checklist-shadowCard shadow
--sunboard-checklist-mutedProgress track / count pill background
--sunboard-checklist-muted-foregroundSecondary text
--sunboard-checklist-primaryAction buttons + progress fill
--sunboard-checklist-primary-foregroundText on primary
--sunboard-checklist-successCompleted step indicator

Launcher

The collapsed checklist button. These default to the checklist's primary colors, so you usually don't need to set them separately.

VariablePurpose
--sunboard-launcher-backgroundLauncher button background
--sunboard-launcher-foregroundLauncher icon/text
--sunboard-launcher-borderLauncher border
--sunboard-launcher-shadowLauncher shadow
--sunboard-launcher-count-backgroundUnfinished-count badge

Tours

VariablePurpose
--sunboard-tour-backgroundTooltip surface
--sunboard-tour-foregroundTooltip text
--sunboard-tour-borderTooltip border
--sunboard-tour-shadowTooltip shadow
--sunboard-tour-muted-foregroundTooltip secondary text
--sunboard-tour-primaryPrimary (next) button
--sunboard-tour-primary-foregroundText on primary button
--sunboard-tour-secondary-backgroundSecondary (back) button
--sunboard-tour-secondary-foregroundSecondary button text
--sunboard-tour-secondary-borderSecondary button border
--sunboard-overlay-colorDimmed page overlay behind an active tour

Hotspots

VariablePurpose
--sunboard-hotspot-backgroundLauncher dot
--sunboard-hotspot-borderDot border
--sunboard-hotspot-dotInner dot color
--sunboard-hotspot-shadowDot shadow
--sunboard-hotspot-pulse-ringPulse ring color

Dark mode

Because everything is a CSS variable, dark mode is just another set of values under your dark selector — no Sunboard-specific switch:

.dark :root,
[data-theme="dark"] {
  --sunboard-checklist-background: #0b0f19;
  --sunboard-checklist-foreground: #e5e7eb;
  --sunboard-checklist-border: #1f2937;
  --sunboard-tour-background: #0b0f19;
  --sunboard-tour-foreground: #e5e7eb;
}

Every variable

Here's the complete set with its default values — the same block sunboard init appends to your global stylesheet when it can find one. Paste it into a stylesheet that loads after @sunboard/react/styles.css and edit any value you like.

your global stylesheet
/* Sunboard theme variables */
:root {
  /* Shared typography and corner radius for all Sunboard UI. */
  --sunboard-font: Inter, sans-serif;
  --sunboard-radius: 12px;

  /* Checklist card surface. */
  --sunboard-checklist-background: white;
  --sunboard-checklist-foreground: #111827;
  --sunboard-checklist-border: #e5e7eb;
  --sunboard-checklist-shadow: 0 18px 60px rgb(15 23 42 / 16%);

  /* Checklist secondary text, progress track, and small count pills. */
  --sunboard-checklist-muted: #f3f4f6;
  --sunboard-checklist-muted-foreground: #6b7280;

  /* Checklist action buttons and progress fill. */
  --sunboard-checklist-primary: #2563eb;
  --sunboard-checklist-primary-foreground: white;

  /* Completed checklist step indicator. */
  --sunboard-checklist-success: #16a34a;

  /* Collapsed checklist launcher button. */
  --sunboard-launcher-background: var(--sunboard-checklist-primary);
  --sunboard-launcher-foreground: var(--sunboard-checklist-primary-foreground);
  --sunboard-launcher-border: var(--sunboard-checklist-border);
  --sunboard-launcher-shadow: var(--sunboard-checklist-shadow);
  --sunboard-launcher-count-background: rgb(255 255 255 / 18%);

  /* Product tour tooltip surface. */
  --sunboard-tour-background: white;
  --sunboard-tour-foreground: #111827;
  --sunboard-tour-border: #e5e7eb;
  --sunboard-tour-shadow: 0 18px 60px rgb(15 23 42 / 16%);
  --sunboard-tour-muted-foreground: #6b7280;

  /* Product tour primary and secondary buttons. */
  --sunboard-tour-primary: #2563eb;
  --sunboard-tour-primary-foreground: white;
  --sunboard-tour-secondary-background: white;
  --sunboard-tour-secondary-foreground: #111827;
  --sunboard-tour-secondary-border: #e5e7eb;

  /* Dimmed page overlay shown behind an active tour. */
  --sunboard-overlay-color: rgb(15 23 42 / 18%);

  /* Hotspot launcher dot and pulse ring. */
  --sunboard-hotspot-background: #2563eb;
  --sunboard-hotspot-border: white;
  --sunboard-hotspot-dot: white;
  --sunboard-hotspot-shadow: 0 18px 60px rgb(15 23 42 / 16%);
  --sunboard-hotspot-pulse-ring: rgb(37 99 235 / 28%);

  /* Preview/debug panel shown when preview cannot find a tour target. */
  --sunboard-debug-background: white;
  --sunboard-debug-foreground: #111827;
  --sunboard-debug-border: #e5e7eb;
  --sunboard-debug-shadow: 0 18px 60px rgb(15 23 42 / 16%);
}

Next steps

On this page