Switch
Switch between two opposing states
# Types
# Sizes
# Styles
# API
Name | Description | Type | Values | Default |
---|---|---|---|---|
type | Type (color) of the switch, optional | String | is-white , is-black , is-light ,
is-dark , is-primary , is-info , is-success ,
is-warning , is-danger ,
and any other colors you've set in the $colors list on Sass | — |
passive-type | Type (color) of the switch when switch is passive, optional | String | is-white , is-black , is-light ,
is-dark , is-primary , is-info , is-success ,
is-warning , is-danger ,
and any other colors you've set in the $colors list on Sass | — |
v-model | Binding value | Any | — | false |
native-value | Same as native value | Any | — | — |
true-value | Overrides the returned value when it's checked | Any | — | true |
false-value | Overrides the returned value when it's not checked | Any | — | false |
disabled | Same as native disabled | Boolean | — | false |
name | Same as native name | String | — | — |
size | Size of the control, optional | String | is-small , is-medium , is-large | — |
rounded | Rounded style | Boolean | — | true |
outlined | Outlined style | Boolean | — | false |
aria-labelledby | Accessibility label to establish relationship between the switch and control label | String | — | — |
# Variables
You can use these variables to customize this component.
Name | Default |
---|---|
$switch-width-number | 2.75 |
$switch-width | $switch-width-number * 1em |
$switch-padding | 0.2em |
$switch-active-background-color | $primary |
$switch-colors | $form-colors |
This page is open source. Noticed a typo or something's unclear?