01. Tailwind Magnetic Ripple Attraction Button Hover Effect (opens in a new tab)
translate and scale properties mean the press no longer has to restate the magnetic pull.35 Tailwind CSS button hover effects for SaaS and CTA buttons, gaming and web3 actions, editorial links, and e-commerce add-to-cart flows — spanning sliding colour wipes, liquid fills, border-draw and gradient-spin outlines, 3D press depths, glitch and holographic distortions, magnetic cursor motion, text flips, and particle bursts. Scoped under .tbh-NN for no-collision pasting, prefers-reduced-motion guarded, framework-agnostic.
Related36 CSS Button Hover Effects20 Tailwind CSS Animated Buttons20 Tailwind CSS Image Hover Effects20 CSS Animated Buttons33 CSS Card Hover Effects
Premium upgradePartner: Untitled UI
Affiliate linkBuilding a whole Tailwind app, not just this component?
You just browsed 36 Tailwind button hover effects. Untitled UI Pro unlocks 5,000+ components and sections and 250+ page examples for React, styled with Tailwind CSS v4. One licence is a one-time $349 with lifetime updates; teams start at $999.
Untitled UI React. We may earn a commission, at no extra cost to you.
translate and scale properties mean the press no longer has to restate the magnetic pull.@keyframes stay CSS; every trigger, every layer and every reduced-motion fallback becomes a class.backdrop-blur-[16px] backdrop-saturate-[1.8] is the whole frost.border-radius is not a design-scale value, so it stays an arbitrary property, and that is the right answer.delay-300.rotate property — three states, and not one of them restates the others.aria-hidden decoration and the accessible name comes from aria-label, so what a screen reader hears never moves.@property is what makes an angle animatable at all, and it has no utility form.delay-[120ms] on the label's colour transition.aria-hidden, so the accessible name never changes under the user.radial-gradient, which is the trick worth stealing from this one.attr(data-text) copies do all the work, and the real label underneath never moves.data-front attribute clipped twice, so the front copy can never disagree with itself.hover:scale-x-[1.04] hover:scale-y-[.96]) that no longer has to repeat the lift.transform-origin between states turns a grow into a directional swipe.perspective, transform-style and backface-visibility — and the port puts all three where you can see them.box-shadow clone of one 6px dot, which means eight particles cost one element and zero extra DOM.ch unit and the steps() count are the whole effect, and both are now visible in the markup where the character count lives.@property and works further back.width from 0, which is the one honest way to make it claim space without the label jumping.:nth-child rules; here each bar carries its own delay-*, which is both shorter and impossible to misread.repeating-conic-gradient rays that scale AND rotate into place.aria-live status and a High-Performance toggle that swaps the GPU-heavy warp for a pure-CSS ripple.relative overflow-hidden, drop a before:absolute before:inset-0 layer holding the fill or glow, then animate it on hover:. The label sits above with its own layer at relative z-10. The sliding wipe (demo 12) starts the layer at before:-translate-x-full and moves it to hover:before:translate-x-0 with before:transition-transform. For effects that respond to a parent state — like the icon slide-in (demo 31) — wrap the label and icon in a group and drive children with group-hover:. Keep every animated layer inside the clipped box so nothing bleeds past the rounded corners, and you'll only need extra CSS for the timed loops.before: or after: layer with absolute inset-0 sits above static content by default, so wrap the text in a span with relative z-10 to lift it. The second classic bug is a wipe or curtain (demos 12, 19, 25) leaking past the corners — that happens when overflow-hidden is missing on the root, so add it there. Third, a wipe that jumps instead of gliding means the transition is on the wrong property: put transition-transform — not transition-all — on the moving layer and animate translate, which the compositor runs without repainting each frame. transition-all also animates layout properties you never intended, which is where the stutter comes from.mousemove read the pointer position relative to the element — subtract getBoundingClientRect() from clientX and clientY — then write those numbers into CSS custom properties, for example el.style.setProperty('--x', x + 'px'). The spotlight consumes them in an arbitrary radial-gradient value; the magnetic button feeds them into a translate. Reset the properties on mouseleave so it eases back to centre. Everything else — the ripple growth, the glow bloom — stays pure CSS, so the script is only about ten lines shuttling two numbers into the styles.motion-safe: — apply the animation only when motion is allowed, and the button falls back to a calm static state for anyone with reduced-motion set. Second, focus: hover is invisible to keyboard users, so pair every hover: with a matching focus-visible: variant and never strip the outline without replacing it. Because these are real <button> elements, Tab reaches them and Enter or Space fires them for free — don't rebuild that on a <div>. Watch contrast on the hovered state too: a wipe that flips the label to white needs the incoming background to still pass against white text.tailwind.config under theme.extend.keyframes plus a matching animation entry, then use the generated class like animate-spin-slow. Or, for a one-off, inline it as an arbitrary value: animate-[glitch_0.3s_steps(2)_infinite] and define the @keyframes glitch in a global stylesheet. The config route wins when several buttons share a timeline; the arbitrary route keeps a single demo self-contained. Either way the keyframe names must match exactly, and remember arbitrary values use underscores where CSS wants spaces.border — borders can't hold a rotating conic gradient. The pattern is a two-layer sandwich: the outer element takes the gradient as its background plus a little padding like p-[2px], and an inner element with the solid button colour and rounded sits on top, so the padding gap reveals the gradient as a faux border. To spin it, animate the gradient's angle — cleanest with an @property-registered angle custom property so a conic gradient can actually transition — or rotate an oversized gradient layer behind a clipped box. If nothing appears, you're usually missing the padding, so there's no gap to expose the border, or the inner layer is transparent and the whole gradient shows straight through.<button> with a type of button; navigation to another URL is an <a>. Both accept the same utility classes, so the effect is identical either way — the centre underline draw (demo 22) suits links, while the plunger press (demo 35) and elastic lift (demo 21) read as actions. To copy one in, paste the markup, keep the wrapper's relative overflow-hidden and any group, and make sure your Tailwind build scans that file so the classes aren't purged from the output. If a demo relies on an arbitrary keyframe or a custom property, carry its @keyframes or config entry across as well, or the animation silently does nothing.20 hand-coded CSS animated buttons — neon glow, ripple, 3D press, liquid fill, jelly bounce, shine sweep, animated border, moving gradient CTA, text flip, submit success state, add-to-cart progress, download icon, hamburger-to-close, toggle switch, loading spinner inside button, next/prev arrow nav, and ghost button background reveal. Half pure CSS, half lightweight JS for production interactions.
11 pure CSS animation-timeline demos built on the W3C scroll() and view() spec — reading progress bar, view-timeline fade & reveal, shrinking sticky header, stacking cards, horizontal scroll section, parallax hero, container shadow indicators, reverse-scroll columns, text scrim reveal, cover card to sticky header, and image zoom / clip-path wipe. Zero JS, off the main thread, Core Web Vitals safe. Copy-paste ready.
25 hand-coded CSS background animations for SaaS hero sections, developer tool documentation, agency portfolios, gaming and Web3 landing pages, seasonal e-commerce campaigns, and dark-mode dashboards. Covers full-screen gradient shifts, animated mesh gradients, aurora borealis glow, cursor spotlight follow, interactive water ripples, dot grid and diagonal stripe patterns, SVG grain and noise texture overlays, topographic contour lines, layered SVG waves, plasma and lava lamp fluids, bokeh light blur, particle constellation networks, matrix digital rain, synthwave 3D perspective grids, starfield warp speed, CRT scanline overlays, fog and mist drift, morphing organic blobs, floating glassmorphism orbs, halftone dot patterns, starry night skies, floating geometric shapes, rising bubbles, and falling snow. 20 are pure CSS with zero JavaScript; the 5 that need it use vanilla canvas or pointer tracking with no dependencies. Every background animates compositor-only properties so it never blocks the main thread, is scoped under a .bga-NN prefix for no-collision pasting, guards prefers-reduced-motion, and ports unchanged to React, Vue, Svelte, Astro, Next.js and Tailwind.