Mixins / foldkit-mixins-ui

PickerView

interface · packages/mixins-ui/src/picker.ts:162

interface PickerView<Value extends string, Outer> {
  readonly model: Model
  readonly onMessage: (message: Message) => NoInfer<Outer>
  readonly label: string
  readonly options: ReadonlyArray<PickerOption<Value>>
  readonly value: Option.Option<NoInfer<Value>>
  readonly placeholder: string
  readonly anchor?: UiListbox.AnchorConfig
  readonly style?: NamedStyle<typeof PickerSlots> | undefined
  readonly mixins?: MixinList<Outer> | undefined
  readonly listbox?: MixinList<Outer> | undefined
  readonly sheet?: MixinList<Outer> | undefined
}

Members

PickerView.model

property · packages/mixins-ui/src/picker.ts:163

readonly model: Model

PickerView.onMessage

property · packages/mixins-ui/src/picker.ts:164

readonly onMessage: (message: Message) => NoInfer<Outer>

PickerView.label

property · packages/mixins-ui/src/picker.ts:166

readonly label: string

Names the control, and titles the Sheet.

PickerView.options

property · packages/mixins-ui/src/picker.ts:167

readonly options: ReadonlyArray<PickerOption<Value>>

PickerView.value

property · packages/mixins-ui/src/picker.ts:169

readonly value: Option.Option<NoInfer<Value>>

The chosen value, which the application keeps.

PickerView.placeholder

property · packages/mixins-ui/src/picker.ts:171

readonly placeholder: string

Shown on the trigger while nothing is chosen.

PickerView.anchor

property · packages/mixins-ui/src/picker.ts:173

readonly anchor?: UiListbox.AnchorConfig

Where the dropdown's panel opens; default below the trigger's start, kept in place.

PickerView.style

property · packages/mixins-ui/src/picker.ts:175

readonly style?: NamedStyle<typeof PickerSlots> | undefined

A style of PickerSlots (Recipes.Picker).

PickerView.mixins

property · packages/mixins-ui/src/picker.ts:177

readonly mixins?: MixinList<Outer> | undefined

Mixins beside the style.

PickerView.listbox

property · packages/mixins-ui/src/picker.ts:179

readonly listbox?: MixinList<Outer> | undefined

The Listbox's style and mixins (Recipes.Listbox), which also draw the options' and the trigger's content.

PickerView.sheet

property · packages/mixins-ui/src/picker.ts:181

readonly sheet?: MixinList<Outer> | undefined

The Sheet's style and mixins (Recipes.Sheet), on DialogSlots.