Mixins / foldkit-mixins-ui

SegmentedOption

interface · packages/mixins-ui/src/segmented.ts:14

interface SegmentedOption<Value extends string> {
  readonly value: Value
  readonly label: string
  readonly icon?: Html | undefined
  readonly iconOnly?: boolean | undefined
  readonly disabled?: boolean | undefined
}

One option of a segmented control: what it stands for, and its words.

Members

SegmentedOption.value

property · packages/mixins-ui/src/segmented.ts:15

readonly value: Value

SegmentedOption.label

property · packages/mixins-ui/src/segmented.ts:17

readonly label: string

Its words; with iconOnly, its accessible name and tooltip.

SegmentedOption.icon

property · packages/mixins-ui/src/segmented.ts:19

readonly icon?: Html | undefined

Drawn before the words, hidden from assistive technology.

SegmentedOption.iconOnly

property · packages/mixins-ui/src/segmented.ts:21

readonly iconOnly?: boolean | undefined

Draws the icon alone, a square option named by label.

SegmentedOption.disabled

property · packages/mixins-ui/src/segmented.ts:22

readonly disabled?: boolean | undefined