ColorPicker
Color picker control.
Example
import { useState } from "react";
import { ColorPicker } from "swash/controls/ColorPicker";
const [value, setValue] = useState("#000000");
() => (
<ColorPicker value={value} onChange={setValue} />
);
API
Props
React props | Value(s) | Description |
---|---|---|
value | string / null | Actual field value. |
onChange | (value: string) => void | Triggered when the color changes. |