Mixins / foldkit-mixins-ui

CheckboxGroupView

interface · packages/mixins-ui/src/checkboxGroup.ts:60

interface CheckboxGroupView<Value extends string, Message> {
  readonly legend: string
  readonly options: ReadonlyArray<CheckboxGroupOption<Value>>
  readonly checked: ReadonlyArray<Value>
  readonly onToggle: (value: Value) => NoInfer<Message>
  readonly id: string
  readonly style?: NamedStyle<typeof CheckboxGroupSlots> | undefined
  readonly mixins?: MixinList<Message> | undefined
  readonly name?: string | undefined
  readonly error?: string | undefined
  readonly selectAll?: CheckboxGroupSelectAll<Value, Message> | undefined
}

Members

CheckboxGroupView.legend

property · packages/mixins-ui/src/checkboxGroup.ts:62

readonly legend: string

What the options answer, the group's accessible name.

CheckboxGroupView.options

property · packages/mixins-ui/src/checkboxGroup.ts:63

readonly options: ReadonlyArray<CheckboxGroupOption<Value>>

CheckboxGroupView.checked

property · packages/mixins-ui/src/checkboxGroup.ts:65

readonly checked: ReadonlyArray<Value>

The checked values, as the application keeps them.

CheckboxGroupView.onToggle

property · packages/mixins-ui/src/checkboxGroup.ts:67

readonly onToggle: (value: Value) => NoInfer<Message>

The Message a press on an option sends; its type comes from h.

CheckboxGroupView.id

property · packages/mixins-ui/src/checkboxGroup.ts:69

readonly id: string

Prefixes every id the group draws, unique on the page.

CheckboxGroupView.style

property · packages/mixins-ui/src/checkboxGroup.ts:71

readonly style?: NamedStyle<typeof CheckboxGroupSlots> | undefined

A style of CheckboxGroupSlots, for the group's look.

CheckboxGroupView.mixins

property · packages/mixins-ui/src/checkboxGroup.ts:73

readonly mixins?: MixinList<Message> | undefined

Mixins beside the style.

CheckboxGroupView.name

property · packages/mixins-ui/src/checkboxGroup.ts:75

readonly name?: string | undefined

Submits each checked value under this name, as one hidden input per value, in the options' order.

CheckboxGroupView.error

property · packages/mixins-ui/src/checkboxGroup.ts:77

readonly error?: string | undefined

Shown under the options; each checkbox is aria-invalid (a group has no such state) and the group is described by it.

CheckboxGroupView.selectAll

property · packages/mixins-ui/src/checkboxGroup.ts:79

readonly selectAll?: CheckboxGroupSelectAll<Value, Message> | undefined

Draws a select-all row above the options, which the recipe sets the options in from.