(this page was created automatically. In case of formatting issues, please visit the official Wiki Page)

Toggle Switch

Overview

Example Switch

Specs

Tokens

Token Description
disabled Disables user interaction.
value Initial on/off state.
hidden Keeps in form but not visible.
saveInLocalStorage Persists state between sessions.
defaultValue Reset value for form reset.
readonly Shows state but cannot change.
dataField Field name used on submit.
controlsRequestType Where value is sent: BODY, HEADER, or PATH.
authorizationDisable Policy set that disables by permissions.
events Configures component events.
ON_INIT (Events) Runs on component initialization.
ON_DESTROY (Events) Runs when component is removed.
ON_VALUE_CHANGE (Events) Runs when user toggles value.
ON_INIT_BASED_ON_USER_VIEW (Events) Runs on init in user view mode.
dataTestId Testing hook ID.

Structure

(Configured in Non-Visual Properties)

(Configured in Visual Properties)

Actions & Variants

(Configured in Events)

(Configured in Visual Properties)

Different versions

Tests

(Configured in Testing Hooks)

Authorization

(Configured in Authorization Properties)

Guidelines

Accessibility