Calm motion: animations on this site only fade, with no movement
ColorPicker
Native color input + swatches
The platform's color picker in a square plate: click the well and the OS dialog opens. The library only frames it. The model is what <input type="color"> gives: a lowercase #rrggbb, no alpha (a platform limit). showValue prints the hex beside the well as an <output>. swatches add one-click presets, drawn by BlessColorSwatches as a radio group, so the arrow keys move between them. Pass { value, label } so a screen reader hears a name, such as "Pink", and not a hex code.
Inside a BlessField the field's label names the input. label is for a picker with no visible label.
Basic
Usage
ts
import { BlessColorPicker } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
id | string | — | |
swatches | (string | { value: string; label: string; })[] | [] | preset swatches: hex, or { value, label } so a screen reader hears a name, not a hex |
disabled | boolean | — | |
label | string | — | accessible name when there is no visible label (a BlessField's label is used otherwise) |
showValue | boolean | true | show the hex next to the well |
modelValue | string | "#e85078" |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: string] |