ColorSwatch

A component for displaying a color swatch. Provides visual representation of a color with proper accessibility semantics.

Examples

Custom Size

With Custom Border

Props

color
string | Color—
colorName
string—
id
string—
className
string | ((values: ColorSwatchRenderProps & { defaultClassName: string; }) => string)—
style
CSSProperties | ((values: ColorSwatchRenderProps & { defaultStyle: CSSProperties; }) => CSSProperties)—
slot
string | null—