# Slider
### Install
``` javascript
import { Slider } from 'vant';
Vue.use(Slider);
```
## Usage
### Basic Usage
```html
```
```js
export default {
data() {
return {
value: 50
};
},
methods: {
onChange(value) {
this.$toast('Current value:' + value);
}
}
};
```
### Range
```html
```
### Disabled
```html
```
### Step size
```html
```
### Custom style
```html
```
### Custom button
```html
{{ value }}
```
### Vertical
```html
```
## API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|------|
| value | Current value | `Number` | `0` |
| disabled | Whether to disable slider | `Boolean` | `false` |
| max | Max value | `Number` | `100` |
| min | Min value | `Number` | `0` |
| step | Step size | `Number` | `1` |
| bar-height | Height of bar | `String` | `2px` |
| active-color | Active color of bar | `String` | `#1989fa` |
| inactive-color | Inactive color of bar | `String` | `#e5e5e5` |
| vertical | Whether to display vertical | `Boolean` | `false` |
### Events
| Event | Description | Arguments |
|------|------|------|
| change | Triggered after value change | value: current rate |
### Slots
| Name | Description |
|------|------|
| button | Custom button |