Skip to content

ColorInput

Used to select colors from a color area.

import { ColorInput } from '@fintech-sandpit/ui/react';
const [color, setColor] = useState('#000000');
return (
<ColorInput
value={color}
label="Select a color"
onChange={setColor}
/>
);
NameTypeDefaultDescription
valueColorThe value of the password field
defaultValueColorThe default value of the password field
sizeSizemdThe size of the password field
labelstringThe label of the password field
namestringcolorThe name of the password field
requiredbooleanfalseWhether the password field is required
readOnlybooleanfalseWhether the password field is read only
disabledbooleanfalseWhether the password field is disabled
NameTypeDescription
onChange(value: Color) => voidCallback fired when the value changes
type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl'

See Color type definition for more information.