React button animations
17 examples. Button animations built with React and Framer Motion. Animated buttons with press states, morphs, loading-to-success transitions and hover effects, ready to recreate in React, SwiftUI or CSS.
React button animations: common questions
- How do I build button animations in React?
- Pick an example below, copy its prompt (or send it to Claude Code, Cursor or Codex) and your agent builds it in React. Each prompt lists the layout, timing and easing, and links a keyframe sheet of the motion. Framer Motion (now motion/react) covers most UI work: layout animations, AnimatePresence for enter and exit, gestures and springs. Use GSAP for long timelines and scroll choreography, and three.js or react-three-fiber for 3D.
- What makes a good button animation?
- A clear pressed state (slight scale down, 0.96–0.98), fast feedback under 150 ms, and a visible result: a loading state, then success or error.
- How do I animate a button from loading to success?
- Morph the label into a spinner, keep the button width stable or animate it smoothly, then swap the spinner for a check with a small spring.
Button animations in other frameworks
More React animations
- All React
- Micro-interactions89
- Screen & page transitions57
- Card animations50
- Landing page animations40
- Hover effects39
- 3D UI animations32
- Text animations30
- Spring animations27
- Input & form animations25
- Menu & navigation animations21
- Scroll animations20
- Morph animations19
- Gradient & glow animations18
- Particle effects16
- Loading animations13
- Toggle & switch animations13
- Chart & data animations13
- Carousel animations11
- Slider animations9
- Onboarding animations7
- Checkbox animations4