sandstone/Switch

Provides a Sandstone-themed pill-shaped toggle switch component.

import Switch from '@enact/sandstone/Switch';

Members

SwitchComponent

A Sandstone-styled component that looks like a toggle switch.

Switch will manage its selected state via Toggleable unless set directly.

import Switch from '@enact/sandstone/Switch';

SwitchBaseComponent

Renders the base level DOM structure of the component.

import {SwitchBase} from '@enact/sandstone/Switch';
Properties
disabled
Boolean

Disables Switch and becomes non-interactive.

Default: false
noAnimation
Boolean

Disables animation.

Default: false
selected
Boolean

Sets whether this control is in the 'on' or 'off' state. true for 'on', false for 'off'.

Default: false

SwitchDecoratorHigher-Order Component

Adds interactive functionality to Switch.

import {SwitchDecorator} from '@enact/sandstone/Switch';
ArrayBooleanFunctionModuleNumberObjectString