Components / Theme Picker

Signer page kit

Theme Picker

One accent colour drives every brand shade on a signing surface. Presets, or any colour, made readable.

  • In the signer page, not yet in the package
  • AGPL-3.0-only
  • Client only · no backend
Theme
The CSS variables this sets
:root {
  --signing-accent: #3157e8;
  --sig-accent: #3157e8;
  --sig-accent-soft: color-mix(in oklab, #3157e8 14%, white);
  --sig-radius: 8px;
  --radius-control: 8px;
  --radius-panel: 12px;
  --font-sans: var(--font-inter), ui-sans-serif, system-ui, sans-serif;
}

In the signer page kit, set the accent with accentProps(accent) on the element around the surface; it sets data-signing-accent and --signing-accent. The secure elements take the same values as a checked appearance object instead.

Presets and your own colour

The accent drives buttons, tints, focus rings and field outlines on everything inside.

Compact, for a toolbar

Accent

A colour too light for white text

accentProps darkens it until white text on it reaches 4.5:1, so an accent from an API never makes Sign unreadable.

#ffd400 → #856e00

#0f766e → #0f766e

Installation

npx shadcn@latest add …

Not published yet

Not in the registry (packages/ui/registry.json) yet.

Props

className and children are left out: every component that takes them passes them on.

ThemePicker

NameTypeDefaultDescription
valueSigningAccentA preset id or a #rrggbb colour.
onChange(a: SigningAccent) => voidCalled with the new accent.
compactbooleanfalseSmaller swatches for toolbars.

accentProps

NameTypeDefaultDescription
accentstring | nullSignNative blueSpread the result on the element that wraps a signing surface.

Accessibility

  • The presets are a radio group: arrow keys move between them.
  • A custom colour too light for white text is darkened until it reaches a 4.5:1 contrast, and the picker says so.