## Slider Drag the slider within a fixed range. ### Basic usage The current value is displayed when the slider is being dragged. :::demo Customize the initial value of the slider by setting the binding value. ```html ``` ::: ### Discrete values The options can be discrete. :::demo Set step size with the `step` attribute. You can display breakpoints by setting the `show-stops` attribute. ```html ``` ::: ### Slider with input box Set value via a input box. :::demo Set the `show-input` attribute to display an input box on the right. ```html ``` ::: ### Range selection Selecting a range of values is supported. :::demo Setting the `range` attribute activates range mode, where the binding value is an array made up of two boundary values. ```html ``` ::: ## Attributes | Attribute | Description | Type | Accepted Values | Default | |---------- |-------------- |---------- |-------------------------------- |-------- | | min | minimum value | number | — | 0 | | max | maximum value | number | — | 100 | | disabled | whether Slider is disabled | boolean | — | false | | step | step size | number | — | 1 | | show-input | whether to display an input box, works when `range` is false | boolean | — | false | | show-input-controls | whether to display control buttons when `show-input` is true | boolean | — | true | | show-stops | whether to display breakpoints | boolean | — | false | | show-tooltip | whether to display tooltip value | boolean | — | true | | range | whether to select a range | boolean | — | false | ## Events | Event Name | Description | Parameters | |---------- |-------- |---------- | | change | triggers when the value changes (if the mouse is being dragged, this event only fires when the mouse is released) | value after changing |