moonstone/Switch

Contains the declaration for the moonstone/Switch.Switch component.

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

Members

SwitchComponent

moonstone/Switch.Switch represents a Boolean state, and looks like a switch in either the 'on' or 'off' positions.

import Switch from '@enact/moonstone/Switch';
Properties
animated
Boolean

Sets whether this control is animated during change.

Default: true
disabled
Boolean

Sets whether this control is disabled, and non-interactive

Default: false
onToggle
Function

The handler to run when the component is toggled.

selected
Boolean

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

Default: false
ArrayBooleanFunctionModuleNumberObjectString