ColorEditor
The props declared for ColorEditor, generated from the types @proyecto-viviana/ui ships.
Import
import { ColorEditor } from "@proyecto-viviana/ui";Props
| Prop | Type | Default | Description |
|---|---|---|---|
class | string | — | Additional CSS class name. |
children | number | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement | — | Children override. If provided, replaces the default layout. solidaria-components |
onChange | (color: Color) => void | — | Handler called when the color changes. solidaria-components |
isDisabled | false | true | — | Whether the editor is disabled. solidaria-components |
value | string | Color | — | The current color value (controlled). solidaria-components |
defaultValue | string | Color | — | The default color value (uncontrolled). solidaria-components |
colorSpace | 'rgb' | 'hsl' | 'hsb' | 'hex' | 'hex' | The initial color space. solidaria-components |
hideAlphaChannel | false | true | — | Whether to hide the alpha channel. solidaria-components |
onColorSpaceChange | (colorSpace: ColorEditorColorSpace | "hex") => void | — | Handler called when the color space changes. solidaria-components |
Declared in packages/viviana-ui/src/color/ColorEditor.tsx.
Props marked solidaria or solidaria-components come from the headless layer underneath and behave the same in both registers. Components that wrap a DOM element also accept that element's standard attributes, which are left out here on purpose — listing them would bury the props that are actually ours.