Swatch Component

Color swatch that mimics <input type="color"> appearance with inner color preview. Supports variants, shapes, sizes, and dynamic colors.

Notes

Basic usage

Default swatches

With input[type=color]

With icons

Variants

Default (muted style)

swatch-outline

swatch-plain

Compound shortcuts

swatch-muted-*

swatch-outline-*

swatch-plain-*

Shapes (swatch-circle === swatch-pill)

R C S F

Shapes + outline

R C S F

Shapes + plain

Sizes

swatch-4 ~ swatch-15

4 5 6 7 8 9 10 11 12 13 14 15

Size + plain (circle)

Size + outline (circle)

Theme colors

Primary / Secondary / Tertiary

Success / Error / Info

Highlight / Warning / Caution

Ink / Title / Description / Caption / Disabled

Custom colors

Multiple color formats are supported:

Tailwind colors

Tailwind + plain square

Use cases

Color picker palette

Outline palette

Selected state with check icon

Label swatches

P S E I P S E