moonstone/ToggleItem

Exports the events and moonstone/ToggleItem.ToggleItemBase components.

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

Members

ToggleItemComponent

moonstone/ToggleItem.ToggleItemBase is a component to make a Toggleable Item (e.g Checkbox, RadioItem). It has a customizable prop for icon, so any Moonstone Icon can be used to represent the selected state.

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

ToggleItemBaseComponent

moonstone/ToggleItem.ToggleItemBase is a component to make a Toggleable Item (e.g Checkbox, RadioItem). It has a customizable prop for icon, so any Moonstone Icon can be used to represent the selected state.

import {ToggleItemBase} from '@enact/moonstone/ToggleItem';
Properties
children
String

The string to be displayed as the main content of the toggle item.

disabled
Boolean

Applies a disabled visual state to the toggle item.

Default: false
icon
StringIcon

Icon property accepts a string or an Icon Element.

Default: null
iconClasses
String

CSS classes for Icon

Default: ''
iconPosition
String

Specifies on which side (before or after) of the text the icon appears.

Default: 'before'
inline
Boolean

Applies inline styling to the toggle item.

Default: false
onClick
Function

The handler to run when the toggle item is toggled. Developers should generally use onToggle instead.

onToggle
Function

The handler to run when the toggle item is toggled.

selected
Boolean

Applies the provided icon when the this is true.

Default: false
value
Any

The value that will be sent to the onToggle handler.

Default: null
ArrayBooleanFunctionModuleNumberObjectString