A switchable switch field.
Props
Name
Description
Type
Default
activeIcon
Icon to display when switch is on in high contrast mode.
[namespace: stringor
symbol, name: string]or
stringor
undefined
activeText
Text to display when switch is on in high contrast mode.
stringor
undefined
disabled
If the field is disabled.
booleanor
undefined
inactiveIcon
Icon to display when switch is off in high contrast mode.
[namespace: stringor
symbol, name: string]or
stringor
undefined
inactiveText
Text to display when switch is off in high contrast mode.
stringor
undefined
invalid
If the field is currently in an error state.
booleanor
undefined
label
The label of the field.
string
messages
The validation messages of the field
ValidationMessagesor
undefined
name
The name of the field.
string
readonly
If the field is editable.
booleanor
undefined
value
The current value of the field.
boolean
ValidationMessages
Name
Description
Type
Events
Event
Detail
Description
fieldchange
FieldChange<boolean>
Emitted when the value of the field is changed.
Methods
Name
Signature
Description
setPending
setPending(pending: boolean) => Promise<void>
Allows you to pause interaction with the input while an operation completes.
CSS Variables
Name
Description
--field-grid-columns
The field layout.