useDragToSnapPoints — Playing card on three places
- from @astryx
- by Astryx
A playing card that a sideways drag moves between three places: a slow release settles on the nearest, a quick flick carries to the next, and a release moving back returns where it started. Buttons settle it from the keyboard, and the new place is announced. Built only on the public useDragToSnapPoints hook.
Install
New to shadcn? Set up your project
If your project already has a shadcn components.json, skip initialization. Otherwise, run this once from your project root.
pnpm dlx shadcn@latest initpnpm dlx shadcn@latest add @astryx/example-use-drag-to-snap-points-playing-card-on-three-placesRegistry dependencies0
The CLI adds no other registry items with this one.
