moonstone/CheckboxItem

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
String

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

disabled
Boolean

When true, applies a disabled style and the control becomes non-interactive.

Default: false
iconPosition
String

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

Default: 'before'
inline
Boolean

When true, an inline visual effect is applied to the button.

Default: false
onToggle
Function

The handler to run when the checkbox item is toggled.

selected
Boolean

When true, a check mark icon is applied to the button.

value
StringNumber

The value that will be sent to the onToggle handler.

Default: ''
ArrayBooleanFunctionModuleNumberObjectString