A checkbox element. The component will automatically render as a Material Design checkbox on Android devices.
Most attributes that can be used for a normal <input type="checkbox">
element can also be used on the <ons-checkbox>
element.
Checkbox
components are provided in Onsen UI:
<Checkbox checked={ this.state.checked } />
modifier
attribute<ons-switch>
element is used to display a draggable toggle switch.<ons-radio>
element is used to display a radio button.<ons-input>
element is used to display a text input.<ons-search-input>
element is used to display a search input.<ons-range>
element is used to display a range slider.<ons-select>
element is used to display a select box.Name | Type | Description |
---|---|---|
input-id | String |
Specify the “id” attribute of the inner <input> element. This is useful when using <label for="..."> elements.
Optional.
|
Name | Description |
---|---|
value | The current value of the checkbox. |
checked | Whether the checkbox is checked or not. |
disabled | Whether the checkbox is disabled or not. |
Name | Description |
---|---|
material | Displays a Material Design checkbox. |
noborder | iOS borderless checkbox. |
Signature | Description |
---|---|
focus() | Focuses the checkbox. |
blur() | Removes focus from the checkbox. |
Focuses the checkbox.
Removes focus from the checkbox.
If you have any questions, use our Community Forum or talk to us on Discord chat. The Onsen UI team and your peers in the community will work together to help solve your issues.
For bug reports and feature requests use our GitHub Issues page.