Color Picker
Choose a color with a visual picker and editable value.
Preview
Import
import { ColorPicker } from "@sigil-ui/components";Usage
<ColorPicker defaultValue="oklch(0.62 0.20 264)" />Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | The current controlled value. |
defaultValue | string | — | Initial value when the component manages its own state. |
onChange | (color: string) => void | — | Called when the value changes. |
swatches | string[] | — | Swatches configuration. |
disabled | boolean | — | Prevents user interaction when enabled. |
Token integration
| CSS Variable | Purpose |
|---|---|
--s-radius-md | Radius md |
--s-border | Border |
--s-border-style | Border style |
--s-input-height | Input height |
--s-font-mono | Font mono |
--s-radius-input | Radius input |
--s-background | Background |
--s-text | Text |
--s-primary | Primary |
--s-duration-fast | Duration fast |
--s-radius-sm | Radius sm |