API reference: @salmonui/inputs/color-picker
ColorPartPropsinterface
import type { ColorPartProps } from '@salmonui/inputs/color-picker';interface ColorPartProps {
readonly value?: ColorInput | undefined;
readonly defaultValue?: ColorInput | undefined;
readonly onValueChange?: ((color: Color, details: ColorChangeDetails) => void) | undefined;
readonly onValueCommit?: ((color: Color, details: ColorChangeDetails) => void) | undefined;
readonly name?: string | undefined;
readonly form?: string | undefined;
readonly valueFormat?: ColorFormat | undefined;
readonly disabled?: boolean | undefined;
readonly localeText?: ColorPartLocaleText | undefined;
readonly className?: string | undefined;
readonly style?: CSSProperties | undefined;
readonly 'aria-label'?: string | undefined;
readonly 'aria-labelledby'?: string | undefined;
readonly id?: string | undefined;
}
Props shared by ColorArea and ColorSlider.
| Name | Signature | Description |
|---|---|---|
valueoptional | readonly value?: ColorInput | undefined; | Controlled color: a string or a |
defaultValueoptional | readonly defaultValue?: ColorInput | undefined; | |
onValueChangeoptional | readonly onValueChange?: ((color: Color, details: ColorChangeDetails) => void) | undefined; | Every change; during a pointer drag at most once per animation frame. |
onValueCommitoptional | readonly onValueCommit?: ((color: Color, details: ColorChangeDetails) => void) | undefined; | The end of a drag, and every keyboard step. |
nameoptional | readonly name?: string | undefined; | Name of a hidden input carrying the color in |
formoptional | readonly form?: string | undefined; | |
valueFormatoptional | readonly valueFormat?: ColorFormat | undefined; | Format of the hidden input value. Default |
disabledoptional | readonly disabled?: boolean | undefined; | |
localeTextoptional | readonly localeText?: ColorPartLocaleText | undefined; | |
classNameoptional | readonly className?: string | undefined; | |
styleoptional | readonly style?: CSSProperties | undefined; | |
aria-labeloptional | readonly 'aria-label'?: string | undefined; | |
aria-labelledbyoptional | readonly 'aria-labelledby'?: string | undefined; | |
idoptional | readonly id?: string | undefined; |