Palette Switcher
utilitiesColor palette switcher for dynamically changing the app's theme palette.
Preview
No preview available
Check the code examples below.
Installation
npm install @launchapp/design-systemImport
import { PaletteSwitcher } from "@launchapp/design-system";Examples
Palette selector
<PaletteSwitcher palettes={[ { id: "blue", name: "Ocean Blue", primary: "#3b82f6" }, { id: "green", name: "Forest Green", primary: "#16a34a" }, { id: "purple", name: "Royal Purple", primary: "#9333ea" }, ]} value="blue" onChange={(id) => console.log("palette:", id)}/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
palettes* | Palette[] | — | Available color palettes. |
value | string | — | Currently active palette id. |
onChange | (id: string) => void | — | Called when palette is selected. |