npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@webrsb/vue-scroll-picker

v2.0.2

Published

iOS Style Scroll Picker Component for Vue 3. Support All Gestures of Mouse(also MouseWheel) and Touch.

Downloads

11

Readme

Vue Scroll Picker

Vue Scroll Picker is an iOS-style scroll picker component for Vue 3. It supports all gestures, including mouse and touch interactions, ensuring a smooth and intuitive user experience.

If you are using Vue 2, please refer to the v0.x branch.

Live Demo (source)

Features

  • TypeScript Support: Uses generics for strict type checking and improved developer experience.
  • Native-like Behavior: Mimics <select> element behavior for consistency.
  • Lightweight & Performant: Minimal dependencies with optimized rendering.

Installation

npm install vue-scroll-picker

Usage

Vue Scroll Picker can be used both globally and locally in your Vue application. Below are examples of how to set it up.

Global Registration

To register Vue Scroll Picker globally in your Vue application, import it in your main file and apply it as a plugin:

Vue3 Global Registration Guide

import { createApp } from "vue";

import VueScrollPicker from "vue-scroll-picker";
import "vue-scroll-picker/style.css";

const app = createApp(); /* */

app.use(VueScrollPicker); // export default is plugin

Local Registration

To use Vue Scroll Picker in a specific component, import it and register it locally:

Vue3 Local Registration Guide

<script setup>
import { VueScrollPicker } from 'vue-scroll-picker'
import "vue-scroll-picker/style.css";

const options = [
  { name: 'Option 1', value: 1 },
  { name: 'Option 2', value: 2 },
  { name: 'Option 3', value: 3 },
]
const modelValue = ref(1)
</script>
<template>
  <VueScrollPicker :options="options" v-model="modelValue" />
</template>

Nuxt

import VueScrollPicker from "vue-scroll-picker" // export default is plugin
import 'vue-scroll-picker/style.css'

export default defineNuxtPlugin({
  async setup({ vueApp }) {
    vueApp.use(VueScrollPicker)
  }
})

Options

Props

Vue Scroll Picker accepts several props to customize its behavior:

| Prop | Type | Default | Description | |------|------|---------|-------------| | modelValue | string \| number \| boolean \| null | undefined | The selected value of the picker. | | options | Array<{ name: string; value: any; disabled?: boolean }> | [] | The list of options displayed in the picker. | | emptyText | string | 'No options available' | Text displayed when there are no options available. | | dragSensitivity | number | 1.7 | Sensitivity of dragging interaction. | | touchSensitivity | number | 1.7 | Sensitivity of touch interaction. | | wheelSensitivity | number | 1 | Sensitivity of mouse wheel scrolling. |

Events

Vue Scroll Picker emits several events to notify changes:

| Event | Payload | Description | |-------|---------|-------------| | update:modelValue | string \| number \| boolean \| null | Fired when the selected value changes. | | start | void | Fired when interaction starts. | | move | string \| number \| boolean \| null | Fired when the selection moves. | | end | string \| number \| boolean \| null | Fired when interaction ends. | | cancel | void | Fired when interaction is canceled. | | wheel | string \| number \| boolean \| null | Fired when using the mouse wheel. | | click | string \| number \| boolean \| null | Fired when the picker is clicked. |

Slots

Vue Scroll Picker provides slots for custom rendering:

| Slot | Props | Description | |------|-------|-------------| | default | { option: { name: string; value: any; disabled?: boolean } } | Custom rendering for each option. | | empty | { text: string } | Custom rendering when no options are available. |