@component-hook/picker

Picker component with vue3 and react
3,782 4
Install
npm install @component-hook/picker
Latest Version:1.7.0
Vue:3
License:MIT
Last Updated:Oct 23, 2026
Links: GitHub  ·  npm
Maintainer: tzuyi0817

@component-hook/picker

Picker component with vue3 and react.

npm npm

Features

  • Supports single-column and cascade picker
  • Scroll wheel 3D effect for smooth selection
  • Flexible column structure for different use cases
  • Built-in DatePicker and TimePicker components
  • Full TypeScript support

Documentation

For detailed documentation and usage examples, please visit: Official Docs.

Installation

# Using npm
$ npm install @component-hook/picker

# Using yarn
$ yarn add @component-hook/picker

# Using pnpm
$ pnpm install @component-hook/picker

Base Usage

Vue3

<script setup lang="ts">
import { Picker } from '@component-hook/picker/vue';
import { ref } from 'vue';

const pickerValues = ref<number[]>([]);
const columns = Array.from({ length: 50 }, (_, index) => ({ label: index, value: index }));

function onChange(value: number[]) {
  pickerValues.value = value;
}
</script>

<template>
  <picker
    :columns="columns"
    @change="onChange"
  />

  <p class="mt-6 text-sm font-mono">Selected value: {{ pickerValues.join('') || 'not selected yet' }}</p>
</template>

React

import { Picker } from '@component-hook/picker/react';
import { useState } from 'react';

const columns = Array.from({ length: 50 }, (_, index) => ({ label: index, value: index }));

export function BasePicker() {
  const [pickerValues, setPickerValues] = useState<number[]>([]);

  return (
    <>
      <Picker
        columns={columns}
        onChange={setPickerValues}
      />

      <p>Selected value: {pickerValues.join('') || 'not selected yet'}</p>
    </>
  );
}

License

This project is licensed under the MIT License.

Related Packages

@salyra-ui/time-picker

Composable time selection and multi-day time ranges

417 0
@salyra-ui/calendar

Composable Gregorian calendars and shared selection primitives

237 0
@salyra-ui/date-picker

Composable date selection and date ranges

218 0
@salyra-ui/date-time-picker

Composable date-time selection and date-time ranges

189 0

Version History

Version Released Vue License
1.7.0 ^3.5.44 MIT
1.6.0 ^3.5.43 MIT
1.5.1 ^3.5.41 MIT
1.5.0 ^3.5.39 MIT
1.4.4 ^3.5.28 MIT
Pre-releases (13)
Version Released Vue License
1.2.1-alpha.0 ^3.4.29 MIT
1.2.0-alpha.0 ^3.4.29 MIT
1.1.5-alpha.0 ^3.4.29 MIT
1.0.2-alpha.1 ^3.4.29 MIT
1.0.2-alpha.0 ^3.4.29 MIT