Color
The <Color> component displays color swatches, for example to document a design system’s palette. Each <Color.Item> shows a swatch with its name and value. A value can differ between light and dark mode.
Usage
primary
#16a34asurface
#ffffff / #0b0b0bMarkdown
Variants
Table
The table variant groups swatches into titled rows with <Color.Row>.
Brand
brand-500
#0ea5e9brand-700
#0369a1Neutral
gray-100
#f3f4f6gray-900
#111827Markdown
Properties
Color
variant
compact lays out swatches in a grid. table lays out <Color.Row> children as titled rows.
Color.Row
title
The row’s label.
Color.Item
value
A CSS color, or separate colors for light and dark mode. If only one of light or dark is set, it’s used in both modes.
name
The name shown under the swatch.