Mixins / foldkit-mixins-ui

ColorPickerView

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

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 words?: Partial<ColorPickerWords> | 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:548

readonly model: Model

ColorPickerView.onMessage

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

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:552

readonly label: string

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

ColorPickerView.presets

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

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:556

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:561

readonly eyedropper?: boolean | undefined

Draws the eyedropper button; default false, on a server and in a browser alike. The view reads no environment, so the application decides from its Model (see canEyedrop).

ColorPickerView.words

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

readonly words?: Partial<ColorPickerWords> | undefined

ColorPickerView.disabled

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

readonly disabled?: boolean | undefined

ColorPickerView.style

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

readonly style?: NamedStyle<typeof ColorPickerSlots> | undefined

A style of ColorPickerSlots, for the look.

ColorPickerView.slider

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

readonly slider?: NamedStyle<typeof SliderSlots> | undefined

The hue and alpha Sliders' style.

ColorPickerView.mixins

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

readonly mixins?: MixinList<Message> | undefined

Mixins beside the style.