SwitchView.id
property · packages/mixins-ui/src/switch/view.ts:19
readonly id: stringPrefixes the ids the switch draws, unique on the page.
Mixins / foldkit-mixins-ui
interface · packages/mixins-ui/src/switch/view.ts:17
interface SwitchView<Outer> {
readonly id: string
readonly checked: boolean
readonly onToggle: (checked: boolean) => NoInfer<Outer>
readonly label: string
readonly description?: string | undefined
readonly position?: TogglePosition | undefined
readonly labelAside?: Html | undefined
readonly disabled?: boolean | undefined
readonly readOnly?: boolean | undefined
readonly invalid?: boolean | undefined
readonly name?: string | undefined
readonly value?: string | undefined
readonly style?: NamedStyle<typeof SwitchSlots> | undefined
readonly mixins?: MixinList<Outer> | undefined
}SwitchView.idproperty · packages/mixins-ui/src/switch/view.ts:19
readonly id: stringPrefixes the ids the switch draws, unique on the page.
SwitchView.checkedproperty · packages/mixins-ui/src/switch/view.ts:21
readonly checked: booleanThe application's field: on or off.
SwitchView.onToggleproperty · packages/mixins-ui/src/switch/view.ts:23
readonly onToggle: (checked: boolean) => NoInfer<Outer>Sent with the state a press leaves.
SwitchView.labelproperty · packages/mixins-ui/src/switch/view.ts:25
readonly label: stringThe switch's accessible name, drawn beside it.
SwitchView.descriptionproperty · packages/mixins-ui/src/switch/view.ts:27
readonly description?: string | undefinedA line under the label, which also describes the control.
SwitchView.positionproperty · packages/mixins-ui/src/switch/view.ts:29
readonly position?: TogglePosition | undefinedend puts the words before the control. Default start.
SwitchView.labelAsideproperty · packages/mixins-ui/src/switch/view.ts:31
readonly labelAside?: Html | undefinedDrawn beside the label: a badge, a hint with a Tooltip.
SwitchView.disabledproperty · packages/mixins-ui/src/switch/view.ts:32
readonly disabled?: boolean | undefinedSwitchView.readOnlyproperty · packages/mixins-ui/src/switch/view.ts:34
readonly readOnly?: boolean | undefinedShows the state and refuses a press.
SwitchView.invalidproperty · packages/mixins-ui/src/switch/view.ts:36
readonly invalid?: boolean | undefinedThe track shows the error ring and says so to a screen reader.
SwitchView.nameproperty · packages/mixins-ui/src/switch/view.ts:38
readonly name?: string | undefinedSubmitted under this name, as value while on and empty otherwise.
SwitchView.valueproperty · packages/mixins-ui/src/switch/view.ts:40
readonly value?: string | undefinedWhat an on switch submits. Default on.
SwitchView.styleproperty · packages/mixins-ui/src/switch/view.ts:41
readonly style?: NamedStyle<typeof SwitchSlots> | undefinedSwitchView.mixinsproperty · packages/mixins-ui/src/switch/view.ts:42
readonly mixins?: MixinList<Outer> | undefined