Palette Switcher

utilities

Color palette switcher for dynamically changing the app's theme palette.

Preview

No preview available

Check the code examples below.

Installation

npm install @launchapp/design-system
Import
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

PropTypeDefaultDescription
palettes*
Palette[]Available color palettes.
value
stringCurrently active palette id.
onChange
(id: string) => voidCalled when palette is selected.