View as Markdown

API reference: @salmonui/inputs/color-picker

ColorAreaPropsinterface

import type { ColorAreaProps } from '@salmonui/inputs/color-picker';
interface ColorAreaProps extends ColorPartProps {
    readonly step?: number | undefined;
    readonly ref?: Ref<HTMLDivElement> | undefined;
}
ColorAreaProps members (16, 14 inherited)
NameSignatureDescription
stepoptionalreadonly step?: number | undefined;

Step of the arrow keys in percent; Shift and Page keys use ten times it. Default 1.

refoptionalreadonly ref?: Ref<HTMLDivElement> | undefined;

The root element.

valueoptionalinheritedvalue?: ColorInput;

Controlled color: a string or a Color (a Color keeps the hue of grays).

defaultValueoptionalinheriteddefaultValue?: ColorInput;
onValueChangeoptionalinheritedonValueChange?: ((color: Color, details: ColorChangeDetails) => void);

Every change; during a pointer drag at most once per animation frame.

onValueCommitoptionalinheritedonValueCommit?: ((color: Color, details: ColorChangeDetails) => void);

The end of a drag, and every keyboard step.

nameoptionalinheritedname?: string;

Name of a hidden input carrying the color in valueFormat.

formoptionalinheritedform?: string;
valueFormatoptionalinheritedvalueFormat?: ColorFormat;

Format of the hidden input value. Default 'hexa'.

disabledoptionalinheriteddisabled?: boolean;
localeTextoptionalinheritedlocaleText?: ColorPartLocaleText;
classNameoptionalinheritedclassName?: string;
styleoptionalinheritedstyle?: CSSProperties;
aria-labeloptionalinheritedaria-label?: string;
aria-labelledbyoptionalinheritedaria-labelledby?: string;
idoptionalinheritedid?: string;