moonstone/ Toggle Item
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
The string to be displayed as the main content of the toggle item.
- disabled
Applies a disabled visual state to the toggle item.
Default: false- icon
Icon property accepts a string or an Icon Element.
Default: null- iconClasses
CSS classes for Icon
Default: ''- iconPosition
Specifies on which side (
before
orafter
) of the text the icon appears.Default: 'before'- inline
Applies inline styling to the toggle item.
Default: false- onClick
The handler to run when the toggle item is toggled. Developers should generally use
onToggle
instead.- onToggle
The handler to run when the toggle item is toggled.
- selected
Applies the provided
icon
when the this istrue
.Default: false- value
The value that will be sent to the
onToggle
handler.Default: null