Skip to content
Calm motion: animations on this site only fade, with no movement

PaletteToggle ​

Accent palette swatches

Swatches for choosing the accent palette the whole site wears: the palette picker on this site. See Palettes for what changes.

Basic
  • Each swatch is a pressed-state button named after its palette. The choice is saved and applied as data-palette on <html>. See Dark mode for applying it before first paint.
  • showDefault (on) includes the default palette's swatch, which clears any other. label names the group.

Usage ​

ts
import { BlessPaletteToggle } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
labelstring—the name of the group for screen readers; wins over `labels.palette`
showDefaultbooleantrueinclude the default palette's swatch (Megumi), which clears any other
labelsPartial<{ palette: string; }>—

Released under the MIT License. Character names and artwork belong to their owners.