sandstone/SwitchItem

Provides Sandstone-themed item component and interactive toggleable switch.

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

Members

SwitchItemComponent

A Sandstone-styled item with a switch component.

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

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

SwitchItemBaseComponent

Renders an item with a Switch.

import {SwitchItemBase} from '@enact/sandstone/SwitchItem';
Properties
css
Object

Customizes the component by mapping the supplied collection of CSS class names to the corresponding internal elements and states of this component.

The following classes are supported:

  • switchItem - The root class name

selected
Boolean

If true the switch will be selected.

Default: false
slotAfter
Node

Nodes to be inserted after children and before the switch.

SwitchItemDecoratorHigher-Order Component

Adds interactive functionality to SwitchItem.

import {SwitchItemDecorator} from '@enact/sandstone/SwitchItem';
ArrayBooleanFunctionModuleNumberObjectString