Dev Design Library

Magnetic Button

Stretches toward your cursor like soft rubber on a magnet, then wobbles home.

Magnetic Button preview
Library
UI Lab
Framework
React
Type
component
License
MIT
Install
npx shadcn@latest add https://lab.xevrion.dev/r/magnetic-button.json
Files
  • src/lab/components/magnetic-button.tsx
  • src/lib/use-reduced-motion.ts
  • src/lib/cn.ts
Source
https://github.com/xevrion/ui-lab

Categories

More from UI Lab