Color Palette
Display labeled color collections including ramps, scales, and brand palettes
Overview
ColorPalette displays labeled color collections as horizontal or vertical strips—perfect for documenting color ramps, scales, brand palettes, and semantic token sets.
These layouts are intentionally flexible and easy to reshape. You get a pre-composed ColorPalette for speed, plus primitives (ColorSwatch, ColorSwatchLabel, ColorPaletteLabel) to build custom layouts like grids or asymmetric compositions.
Installation
npx shadcn add @tokenui/color-palette
Usage
Composition
A pre-composed ColorPalette component is provided for convenience. Compose the low-level primitives (ColorSwatch, ColorSwatchLabel, ColorPaletteLabel) when you need full control over layout, spacing, or custom behavior.
Vertical layout
Toggle the layout with orientation="vertical":
API Reference
ColorPalette
Pre-composed palette component with labels shown by default.
Prop
Type
ColorSwatch
A single color swatch in a palette.
Prop
Type
ColorSwatchLabel
Label displayed on hover inside a color swatch.
ColorPaletteLabel
Label displayed above a palette.