# vue3-scroll-picker
**Repository Path**: mirrors_singod/vue3-scroll-picker
## Basic Information
- **Project Name**: vue3-scroll-picker
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-04-18
- **Last Updated**: 2026-03-22
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# vue3-scroll-picker
Vue 3 scroll picker plugin.
### Demo
[Demo](https://hj29.github.io/vue3-scroll-picker/)
[Demo Code](https://github.com/HJ29/vue3-scroll-picker/tree/master/example/src/)
### Install
```bash
yarn add vue3-scroll-picker
npm i --save vue3-scroll-picker
```
### Register Global Component
```js
import { createApp } from 'vue';
import App from './App.vue'
import ScrollPicker from 'vue3-scroll-picker';
const app = createApp(App);
app.use(ScrollPicker);
app.mount('#app')
```
### Register Local Component
```js
import ScrollPicker from 'vue3-scroll-picker';
export default {
components: {
ScrollPicker,
},
};
```
### Example
```vue
```
```vue
```
### Props
| Name | Type | Required | Default | Notes |
| ---------------------- | -------------------------------------------------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| :options | string[][]
{ label: string; value: string }[][] | yes | [] | Options use can select.
label value type: label as display, value to emit
label value example: [ [ { label: 'A1', value: 'a1' }, { label: 'A2', value: 'a2' } ], [ { label: 'B1', value: 'b1' } ] ]
string type: same label and value
string type example: [ [ 'a1', 'a2' ], [ 'b1' ] ] |
| :valueModel \| v-model | string[] | yes | [] | Array value emit
Example: [ 'a2', 'b1' ] |
| active-style | string | no | '' | css (change active option style)style |
| inactive-style | string | no | '' | css (change inactive option style)style |
| active-class | string | no | '' | css class |
| inactive-class | string | no | '' | css class |
### Event
| Name | Description |
| ------------------ | -------------------------- |
| @update:modelValue | event emit when use select |
### Slot
| Name | prop | Description |
| --------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| v-slot:option | active: boolean
item: string \| { label: string; value: string } | override option card |
| v-slot:center-overlay | | override center active option area, able to add seperator to active area |
| v-slot:top-overlay | | override top inactive option area, able to change top gradient color |
| v-slot:bottom-overlay | | override bottom inactive option area, able to change bottom gradient color |
## Project setup
```
yarn
```
### Compiles and hot-reloads for development
```
yarn serve
```
### Compiles and minifies for production
```
yarn build
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).