ColourInput
Examples
Loading examples…
API
From COMPONENTS.md.
Hex colour picker: a native <input type="color"> swatch paired with a text field for direct hex entry. Normalises 3-digit shorthand (#abc → #aabbcc) on blur. Wrap in Field for a label.
import { ColourInput, Field } from 'achery-ui'
<Field label="Category colour">
<ColourInput value={colour} onChange={setColour} />
</Field>
| Prop | Type | Default | Notes |
|---|---|---|---|
value |
string |
'#000000' |
Hex colour string |
onChange |
(value: string) => void |
— | |
error |
boolean |
false |
Applies danger border |
placeholder |
string |
'000000' |
Text field placeholder |
disabled |
boolean |
false |
|
className |
string |
— |