A checkbox component. 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">
component can also be used on the <v-ons-checkbox>
component.
Checkboxes are created with the VOnsCheckbox
component. It works almost exactly the same way as a normal <input type="checkbox">
tag.
An attribute input-id
is provided to set the ID of the inner native element. This is useful for HTMLLabel
elements: <label for="some-inner-input">
.
Every input is compatible with v-model
directive. Checkboxes can be bound to arrays or booleans normally. The only exception are modifiers (as of `vue@2.3). There is, however, a workaround for
lazy` modifier:
<v-ons-input v-model="something" model-event="change"></v-ons-input>
This will use change
event instead of input
when updating v-model
.
modifier
attribute<v-ons-switch>
component is used to display a draggable toggle switch.<v-ons-radio>
component is used to display a radio button.<v-ons-input>
component is used to display a text input.<v-ons-search-input>
component is used to display a search input.<v-ons-range>
component is used to display a range slider.<v-ons-select>
component is used to display a select box.Name | Type | Description |
---|---|---|
input-id | String |
Specify the “id” attribute of the inner <input> component. This is useful when using <label for="..."> components.
Optional.
|
Name | Description |
---|---|
material | Displays a Material Design checkbox. |
noborder | iOS borderless 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.