ColorPicker
A native color picker with accessible naming.
Interactive preview
#087565Usage
import { ColorPicker, Label } from "@devvy-ui/react";
<Label htmlFor="accent">Accent color</Label>
<ColorPicker id="accent" label="Accent color" name="accent" defaultValue="#087565" />API reference
Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | required | Accessible color name. |
| value / defaultValue / onChange | string / string / native event | browser default | Native hexadecimal color selection. |
Accessibility & behavior
Platform Behavior & Guidelines
Uses type=color and the platform picker. For portable values use six-digit hexadecimal colors; browser support for other formats varies. Preserve a visible label and validate downstream uses. Native disabled, form/reset and refs remain supported.
Source ownership
Run npx @devvy-ui/cli init once in your React project, then add the source:
npx @devvy-ui/cli add color-pickerMake the source yours.
Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.
Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.