A switchable switch.
Props
Name
Description
Type
Default
activeIcon
Icon to display when switch is on in high contrast mode.
[namespace: stringor
symbol, name: string]or
string
[ICON_NAMESPACE, check]
activeText
Text to display when switch is on in high contrast mode.
string
On
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
string
[ICON_NAMESPACE, check]
inactiveText
Text to display when switch is off in high contrast mode.
string
Off
invalid
If the field is currently in an error state.
booleanor
undefined
name
The name of the field.
string
readonly
If the field is editable.
booleanor
undefined
value
The current value of the field.
boolean
Events
Event
Detail
Description
fieldchange
FieldChange<boolean, string>
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.