moonstone/ Checkbox Item
Exports the moonstone/CheckboxItem.CheckboxItem component.
import CheckboxItem from '@enact/moonstone/CheckboxItem';
Members
CheckboxItemComponent
moonstone/CheckboxItem.CheckboxItem is a component that is an Item that is Toggleable. It
has two states: true
(selected) & false
(unselected). It uses a check icon to represent its
selected state.
By default, CheckboxItem
maintains the state of its selected
property. Supply the
defaultSelected
property to control its initial value. If you wish to directly control updates
to the component, supply a value to selected
at creation time and update it in response to
onToggle
events.
import CheckboxItem from '@enact/moonstone/CheckboxItem';
CheckboxItemBaseComponent
moonstone/CheckboxItem.CheckboxItemBase is a component that
is an Item that is Toggleable. It has two states: true
(selected) & false
(unselected). It uses a check icon to represent its selected state.
import {CheckboxItemBase} from '@enact/moonstone/CheckboxItem';
Properties
- children
The string to be displayed as the main content of the checkbox item.
- disabled
When
true
, applies a disabled style and the control becomes non-interactive.Default: false- iconPosition
Specifies on which side (
before
orafter
) of the text the icon appears.Default: 'before'- inline
When
true
, an inline visual effect is applied to the button.Default: false- onToggle
The handler to run when the checkbox item is toggled.
- selected
When
true
, a check mark icon is applied to the button.- value
The value that will be sent to the
onToggle
handler.Default: ''