Wheel Picker
ncdai-chirags/wheel-pickerFreeComponent
iOS-like wheel picker for React with smooth inertia scrolling and infinite loop support.
Install it
npx shadcn@latest add https://www.chirags.dev/r/wheel-picker.jsonSource
1import "@ncdai/react-wheel-picker/style.css";23import * as WheelPickerPrimitive from "@ncdai/react-wheel-picker";45import { cn } from "@/lib/utils";67type WheelPickerValue = WheelPickerPrimitive.WheelPickerValue;89type WheelPickerOption<T extends WheelPickerValue = string> =10 WheelPickerPrimitive.WheelPickerOption<T>;1112type WheelPickerClassNames = WheelPickerPrimitive.WheelPickerClassNames;1314function WheelPickerWrapper({15 className,16 ...props17}: React.ComponentProps<typeof WheelPickerPrimitive.WheelPickerWrapper>) {18 return (19 <WheelPickerPrimitive.WheelPickerWrapper20 className={cn(21 "w-56 rounded-lg border border-zinc-200 bg-white px-1 shadow-xs dark:border-zinc-700/80 dark:bg-zinc-900",22 "*:data-rwp:first:*:data-rwp-highlight-wrapper:rounded-s-md",23 "*:data-rwp:last:*:data-rwp-highlight-wrapper:rounded-e-md",24 className25 )}26 {...props}27 />28 );29}3031function WheelPicker<T extends WheelPickerValue = string>({32 classNames,33 ...props34}: WheelPickerPrimitive.WheelPickerProps<T>) {35 return (36 <WheelPickerPrimitive.WheelPicker37 classNames={{38 optionItem: "text-zinc-400 dark:text-zinc-500",39 highlightWrapper:40 "bg-zinc-100 text-zinc-950 dark:bg-zinc-800 dark:text-zinc-50",41 ...classNames,42 }}43 {...props}44 />45 );46}4748export { WheelPicker, WheelPickerWrapper };49export type { WheelPickerClassNames, WheelPickerOption };
What it pulls in
npm packages
Other registry items
Files it writes
More from ncdai
All 28 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Apple Hello Effectapple-hello-effect | ncdai | Components | Free | 1 dep | |
| Consent Managerconsent-manager | ncdai | Components | Free | 1 dep · 2 files | |
| Flip Sentencesflip-sentences | ncdai | Components | Free | 1 dep | |
| GitHub Starsgithub-stars | ncdai | Components | Free | no deps | |
| Scroll Fade Effectscroll-fade-effect | ncdai | Components | Free | no deps | |
| Shimmering Textshimmering-text | ncdai | Components | Free | 1 dep | |
| Slide to Unlockslide-to-unlock | ncdai | Components | Free | 1 dep | |
| Testimonials Marqueetestimonials-marquee | ncdai | Components | Free | no deps |
