Checkbox
Select a single or grouped options
Class props
Checkbox component
Select a single or grouped options
html
<o-checkbox></o-checkbox>
Props
Prop name | Description | Type | Values | Default |
---|---|---|---|---|
autocomplete | Same as native autocomplete options to use in HTML5 validation | string | - | From config: checkbox: { |
disabled | Same as native disabled | boolean | - | false |
falseValue | Overrides the returned value when it's not checked | string|number|boolean | - | false |
indeterminate | Same as native indeterminate | boolean | - | false |
label | Input label, unnecessary when default slot is used | string | - | |
name | Same as native name | string | - | |
nativeValue | Same as native value | string|number|boolean | - | |
override | Override existing theme classes completely | boolean | - | |
required | Same as native required | boolean | - | false |
size | Size of the control | string | small , medium , large | From config: checkbox: { |
trueValue | Overrides the returned value when it's checked | string|number|boolean | - | true |
useHtml5Validation | Enable html 5 native validation | boolean | - | From config: { |
v-model | string|number|boolean|array | - | ||
variant | Color of the control | string | primary , info , success , warning , danger , and any other custom color | From config: checkbox: { |
Events
Event name | Properties | Description |
---|---|---|
update:modelValue | value string, number, boolean, array - updated modelValue prop | modelValue prop two-way binding |
input | value string, number, boolean, array - input valueevent Event - native event | on input change event |
update:indeterminate | value boolean - updated indeterminate prop | indeterminate prop two-way binding |
focus | event Event - native event | on input focus event |
blur | event Event - native event | on input blur event |
invalid | event Event - native event | on input invalid event |
Slots
Name | Description | Bindings |
---|---|---|
default | Content slot, default is label prop |
Sass variables
Current theme ➜ Oruga Base
SASS Variable | Default |
---|---|
$checkbox-active-background-color | $primary |
$checkbox-background-color | $primary |
$checkbox-border-color | $primary |
$checkbox-border-radius | $base-border-radius |
$checkbox-border-width | 2px |
$checkbox-checked-box-shadow-length | 0 0 0.5em |
$checkbox-checked-box-shadow-opacity | 0.8 |
$checkbox-checkmark-color | $primary-invert |
$checkbox-disabled-opacity | $base-disabled-opacity |
$checkbox-label-padding | 0 0 0 0.5em |
$checkbox-margin-sibiling | 0.5em |
$checkbox-size | 1rem |
$checkbox-line-height | 1.5 |
See ➜ 📄 Full scss file
Current theme ➜ Oruga Full
SASS Variable | Default |
---|---|
$checkbox-active-background-color | $primary |
$checkbox-background-color | $primary |
$checkbox-border-color | $primary |
$checkbox-border-radius | $base-border-radius |
$checkbox-border-width | 2px |
$checkbox-checked-box-shadow-length | 0 0 0.5em |
$checkbox-checked-box-shadow-opacity | 0.8 |
$checkbox-checkmark-color | $primary-invert |
$checkbox-disabled-opacity | $base-disabled-opacity |
$checkbox-label-padding | 0 0 0 0.5em |
$checkbox-margin-sibiling | 0.5em |
$checkbox-size | 1rem |
$checkbox-line-height | 1.5 |
See ➜ 📄 Full scss file
Current theme ➜ Bulma
The theme does not have any custom variables for this component.
Current theme ➜ Bootstrap
The theme does not have any custom variables for this component.