Button animations
6 presets. Open one to tune it and copy the code.
Six button animations that solve specific UI jobs rather than decorating for its own sake. The Loading button shows a busy state with a spinner and aria-busy. Shine sweep and Pulse glow pull attention to a single primary call to action. The 3D press button gives tactile feedback on click by sinking into its own edge. Border draw turns a quiet outline button into something that responds on hover, and Gradient shift adds slow color movement to upgrade or pricing buttons.
Each one is a real button element with a type attribute, so it keeps keyboard and form behaviour. You can edit the label, colors, corner radius, timing and easing with a live preview.
Copy the result as plain CSS, as Tailwind utility classes, or as a React component built on Motion. For hover-driven variants like fill sweep and arrow nudge, see the hover effects collection.
How many animated buttons should a page have?
Usually one attention-seeking animation per screen. A pulsing or shining CTA works because it is the only thing moving; three of them compete and users tune them all out. Feedback animations are different: press, loading and hover states can apply to every button because they only play in response to the user.
How do I add a button animation on click?
For a press effect, use the 3D press button, which animates on :active in CSS and whileTap in React. For something that plays after a click, such as a spinner while a request runs, use the Loading button and toggle its busy state from your click handler. Both keep the native button element.
Do animated buttons hurt performance?
Not if they animate the right properties. Most presets here animate transform and opacity, which the browser composites cheaply. Pulse glow and Gradient shift animate box-shadow and background-position, which repaint each frame; that is fine for one or two buttons but worth avoiding in long lists.