Skip to content

    Browse components

    Drum Picker

    iOS-style picker wheel: rows curve around a 3D cylinder, snap into place and respond to wheel, drag, touch and arrow keys.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/drum-picker

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/drum-picker.json

    Usage

    import { DrumPicker } from "@/components/ui/drum-picker";
    
    <DrumPicker options={["Small", "Medium", "Large"]} onChange={(v) => setSize(v)} />

    Props

    PropTypeDefaultDescription
    optionsReactNode—string[] of choices.
    defaultIndexnumber0Initially selected index.
    itemHeightnumber40Row height in px.
    visibleCountnumber5Rows visible at once.
    curvaturenumber20Degrees each row turns away from the center.
    loopbooleanfalseLoop the wheel so it never hits an end.
    labelstring"Options"Accessible name.
    onChangeReactNode—(value: string, index: number) => void
    classNamestring—Extra classes for the root element.