Wheel Picker
ncdai/wheel-pickerUnverifiedComponent
iOS-like wheel picker for React with smooth inertia scrolling and infinite loop support.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/Sumeet011/Portfolio/main/public/r/wheel-picker.jsonSource
1import "@ncdai/react-wheel-picker/style.css"23import type { ComponentProps } from "react"4import * as WheelPickerPrimitive from "@ncdai/react-wheel-picker"56import { cn } from "@/lib/utils"78type WheelPickerValue = WheelPickerPrimitive.WheelPickerValue910type WheelPickerOption<T extends WheelPickerValue = string> =11 WheelPickerPrimitive.WheelPickerOption<T>1213type WheelPickerClassNames = WheelPickerPrimitive.WheelPickerClassNames1415function WheelPickerWrapper({16 className,17 ...props18}: ComponentProps<typeof WheelPickerPrimitive.WheelPickerWrapper>) {19 return (20 <WheelPickerPrimitive.WheelPickerWrapper21 className={cn(22 "w-56 rounded-lg border border-zinc-200 bg-white px-1 shadow-xs dark:border-zinc-700/80 dark:bg-zinc-900",23 "*:data-rwp:first:*:data-rwp-highlight-wrapper:rounded-s-md",24 "*:data-rwp:last:*:data-rwp-highlight-wrapper:rounded-e-md",25 className26 )}27 {...props}28 />29 )30}3132function WheelPicker<T extends WheelPickerValue = string>({33 classNames,34 ...props35}: WheelPickerPrimitive.WheelPickerProps<T>) {36 return (37 <WheelPickerPrimitive.WheelPicker38 classNames={{39 optionItem: cn(40 "text-zinc-400 dark:text-zinc-500 data-disabled:opacity-40",41 classNames?.optionItem42 ),43 highlightWrapper: cn(44 "bg-zinc-100 text-zinc-950 dark:bg-zinc-800 dark:text-zinc-50",45 "data-rwp-focused:inset-ring-2 data-rwp-focused:inset-ring-zinc-300 dark:data-rwp-focused:inset-ring-zinc-600",46 classNames?.highlightWrapper47 ),48 highlightItem: cn(49 "data-disabled:opacity-40",50 classNames?.highlightItem51 ),52 }}53 {...props}54 />55 )56}5758export { WheelPicker, WheelPickerWrapper }59export type { WheelPickerClassNames, WheelPickerOption }
What it pulls in
npm packages
Files it writes
More from ncdai
All 48 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Apple Hello Effectapple-hello-effect | ncdai | Components | Unverified | 1 dep | |
| Apple Hello Effect - Hindiapple-hello-effect-hindi | ncdai | Components | Unverified | 1 dep | |
| Apple Hello Effect - Spanishapple-hello-effect-spanish | ncdai | Components | Unverified | 1 dep | |
| Apple Hello Effect - Vietnameseapple-hello-effect-vietnamese | ncdai | Components | Unverified | 1 dep | |
| Brand Assets Menubrand-assets-menu | ncdai | Components | Unverified | 1 dep | |
| chevrons-up-down-iconchevrons-up-down-icon | ncdai | Components | Unverified | 1 dep | |
| Code Block Commandcode-block-command | ncdai | Components | Unverified | 4 deps · 2 files | |
| Consent Managerconsent-manager | ncdai | Components | Unverified | 1 dep |
