createDragToSnapPoints — Playing card in plain JavaScript
- from @astryx
- by Astryx
The three-place playing card from the useDragToSnapPoints example, built in plain JavaScript with createDragToSnapPoints: a sideways drag settles it on the nearest place or the next after a flick, buttons settle it from the keyboard, and a live region announces the place. React only mounts it.
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-create-drag-to-snap-points-playing-card-in-plain-java-scriptRegistry dependencies0
The CLI adds no other registry items with this one.
