Themes

Fields/Components/es-switch
es-switch

A switchable switch.

Props

Name
Description
Type
Default
activeIcon

Icon to display when switch is on in high contrast mode.

[namespace: string
or
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.

boolean
or
undefined
inactiveIcon

Icon to display when switch is off in high contrast mode.

[namespace: string
or
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.

boolean
or
undefined
name

The name of the field.

string
readonly

If the field is editable.

boolean
or
undefined
value

The current value of the field.

boolean

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.