Use Slider Tick component to add custom ticks and labels
Slider
A slider to select a value or range from a given range
# Sizes
# Types
# Customization
# Tick and label
# Range slider
Just bind the value to an Array.
# Lazy update
Use lazy
to update v-model
only when dragging is finished.
# API
Slider
Name | Description | Type | Values | Default |
---|---|---|---|---|
v-model | Binding value | Number, Array | — | — |
min | Minimum value | Number | — | 0 |
max | Maximum value | Number | — | 100 |
step | Step interval of ticks | Number | — | 1 |
type | Type (color) of the slider, 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 | is-primary |
size | Thickness of the slider, optional | String | is-small , is-medium , is-large | — |
ticks | Show tick marks | Boolean | — | false |
tooltip | Show tooltip when thumb is being dragged | Boolean | — | true |
tooltip-type | The type (color) of the tootip. Defaults to type | 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 | type |
rounded | Rounded thumb | Boolean | — | false |
disabled | Disable the slider | Boolean | — | false |
custom-formatter | Function to format the tooltip label for display | Function | — | — |
aria-label | Accessibility label for the thumbs | String, Array | — | — |
SliderTick
Name | Description | Type | Values | Default |
---|---|---|---|---|
value | The value that the tick represents | Number | — | — |
# Variables
You can use these variables to customize this component.
Name | Default |
---|---|
$slider-radius | $radius |
$slider-track-background | $grey-lighter |
$slider-track-radius | $radius |
$slider-track-border | 0px solid $grey |
$slider-track-shadow | 0px 0px 0px $grey |
$slider-thumb-background | $white |
$slider-thumb-radius | $radius |
$slider-thumb-border | 1px solid $grey-light |
$slider-thumb-shadow | none |
$slider-thumb-to-track-ratio | 2 |
$slider-tick-to-track-ratio | 0.5 |
$slider-tick-width | 3px |
$slider-tick-radius | $radius |
$slider-tick-background | $grey-light |
$slider-mark-size | 0.75rem |
This page is open source. Noticed a typo or something's unclear?