Mixins / foldkit-mixins-ui

ColorPickerView

interface · packages/mixins-ui/src/colorPicker.ts:517

interface ColorPickerView<Message> {
  readonly model: Model
  readonly onMessage: (message: typeof Message.Type) => NoInfer<Message>
  readonly label: string
  readonly presets?: ReadonlyArray<ColorPickerPreset> | undefined
  readonly alpha?: boolean | undefined
  readonly eyedropper?: boolean | undefined
  readonly labels?: Partial<ColorPickerLabels> | undefined
  readonly disabled?: boolean | undefined
  readonly style?: NamedStyle<typeof ColorPickerSlots> | undefined
  readonly slider?: NamedStyle<typeof SliderSlots> | undefined
  readonly mixins?: MixinList<Message> | undefined
}

Members

ColorPickerView.model

property · packages/mixins-ui/src/colorPicker.ts:518

readonly model: Model

ColorPickerView.onMessage

property · packages/mixins-ui/src/colorPicker.ts:520

readonly onMessage: (message: typeof Message.Type) => NoInfer<Message>

Lifts the picker's own Messages into the application's.

ColorPickerView.label

property · packages/mixins-ui/src/colorPicker.ts:522

readonly label: string

What the color is for, shown and naming the group.

ColorPickerView.presets

property · packages/mixins-ui/src/colorPicker.ts:524

readonly presets?: ReadonlyArray<ColorPickerPreset> | undefined

Colors one press away, drawn as a radio group of swatches; the one equal to the color is checked.

ColorPickerView.alpha

property · packages/mixins-ui/src/colorPicker.ts:526

readonly alpha?: boolean | undefined

Default true; without it the color is opaque and its slider is not drawn.

ColorPickerView.eyedropper

property · packages/mixins-ui/src/colorPicker.ts:528

readonly eyedropper?: boolean | undefined

Draws the eyedropper; default whether the browser has one (canEyedrop).

ColorPickerView.labels

property · packages/mixins-ui/src/colorPicker.ts:529

readonly labels?: Partial<ColorPickerLabels> | undefined

ColorPickerView.disabled

property · packages/mixins-ui/src/colorPicker.ts:530

readonly disabled?: boolean | undefined

ColorPickerView.style

property · packages/mixins-ui/src/colorPicker.ts:532

readonly style?: NamedStyle<typeof ColorPickerSlots> | undefined

A style of ColorPickerSlots, for the look.

ColorPickerView.slider

property · packages/mixins-ui/src/colorPicker.ts:534

readonly slider?: NamedStyle<typeof SliderSlots> | undefined

The hue and alpha Sliders' style.

ColorPickerView.mixins

property · packages/mixins-ui/src/colorPicker.ts:536

readonly mixins?: MixinList<Message> | undefined

Mixins beside the style.