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@latest add @tokenui/color-palette
Usage
The default ColorPalette component is the fastest way to render a collection of colors with automatic labels and hover states.
Customize swatches
Vertical layout
Toggle the layout with orientation="vertical" for tight sidebars or detailed token lists:
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.