vue-slider-component
Version:
A highly customized slider component
116 lines (80 loc) โข 2.6 kB
Markdown

[][npm]
[][npm]
[]()
> ๐ A highly customized slider component
English | [็ฎไฝไธญๆ][ch] | [ะ ัััะบะธะน][ru]
## ๐ Vue3.x
This is still in beta and may contain unexpected bugs, please use with caution.
#### install
```bash
$ yarn add vue-slider-component@next
# npm install vue-slider-component@next --save
```
#### Breaking Changes
- `value` -> `modelValue`. ([Official API Changes](https://v3-migration.vuejs.org/breaking-changes/v-model.html#v-model))
## โจ Features
- ๐ More customizable
- ๐ Multiple style themes
- ๐ณ Support for more sliders
- ๐ Add marks
- ๐ Support SSR
- ๐ Support Typescript
## ๐ Documentation
Document: <https://nightcatsama.github.io/vue-slider-component>
Live Demo: <https://jsfiddle.net/NightCatSama/2xy72dod/10547/>
## ๐ฏ install
```bash
$ yarn add vue-slider-component
# npm install vue-slider-component --save
```
## ๐ Usage
<details><summary>Vue 2</summary>
```vue
<template>
<vue-slider v-model="value" />
</template>
<script>
import VueSlider from 'vue-slider-component'
import 'vue-slider-component/theme/antd.css'
export default {
components: {
VueSlider,
},
data() {
return {
value: 0,
}
},
}
</script>
```
</details>
<details><summary>Vue 3</summary>
```vue
<template>
<vue-slider v-model="value" />
</template>
<script setup>
import { reactive, toRefs } from 'vue'
import VueSlider from 'vue-slider-component'
import 'vue-slider-component/theme/antd.css'
export default {
setup() {
const data = reactive({ value: 0 })
return toRefs(data)
},
}
</script>
```
</details>
## Changelog
Detailed changes for each release are documented in the [release notes](https://github.com/NightCatSama/vue-slider-component/blob/master/CHANGELOG.md).
## Support
If my code has helped you, please consider [buy me a coffee](https://www.buymeacoffee.com/nightcat) โ.
## License
[MIT](https://github.com/NightCatSama/vue-slider-component/blob/master/LICENSE)
[npm]: https://www.npmjs.com/package/vue-slider-component
[en]: https://github.com/NightCatSama/vue-slider-component/blob/master/README.md
[ch]: https://github.com/NightCatSama/vue-slider-component/blob/master/README-CN.md
[ru]: https://github.com/NightCatSama/vue-slider-component/blob/master/README-RU.md