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-paletteon<html>. See Dark mode for applying it before first paint. showDefault(on) includes the default palette's swatch, which clears any other.labelnames the group.
Usage
ts
import { BlessPaletteToggle } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
label | string | — | the name of the group for screen readers; wins over `labels.palette` |
showDefault | boolean | true | include the default palette's swatch (Megumi), which clears any other |
labels | Partial<{ palette: string; }> | — |