createAnimator — Playing cards in plain JavaScript
- from @astryx
- by Astryx
The playing card from the useAnimator example, built in plain JavaScript with createAnimator and pointer events: it follows a drag, springs back on a gentle release, flies off with momentum on a quick flick, and a button discards it from the keyboard. 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-animator-playing-cards-in-plain-java-scriptRegistry dependencies0
The CLI adds no other registry items with this one.
