01. Tailwind Underline Draw Hover Effect (opens in a new tab)
background-size sweep. The port's win is that the resting transform and the hover transform sit side by side in one class list, so the pair cannot drift apart.30 Tailwind CSS hover effects for editorial links and navigation, marketing CTAs and add-to-cart buttons, product and profile cards, and image galleries — spanning underline draws, glitch and neon text, magnetic liquid and 3D-press buttons, tilt and flip cards, zoom-pan and duotone images, and cursor-trail motion. Scoped under .thv-NN for no-collision pasting, prefers-reduced-motion guarded, framework-agnostic.
Related36 Tailwind CSS Button Hover Effects33 Tailwind CSS Card Hover Effects30 CSS Text Hover Effects33 CSS Card Hover Effects
Premium upgradePartner: Untitled UI
Affiliate linkBuilding a whole Tailwind app, not just this component?
You just browsed 30 Tailwind 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.
background-size sweep. The port's win is that the resting transform and the hover transform sit side by side in one class list, so the pair cannot drift apart.--animate-* token, so firing one is a single hover:before:animate-* utility.tracking-* scale covers the resting values; the wide hover targets are arbitrary, which is the correct split.bg-clip-text and text-transparent are first-class utilities, which makes this the port that shrinks the most.before: and after:; the base element goes transparent so nothing shows through the seam.text-shadow has no utility form and gets none here; what the port gains is that the dim resting glow and the lit hover glow are adjacent, so the pair is edited together.before: pseudo-elements scaled from zero; the label rides above on relative z-10.--angle rather than rotating the element, which is what keeps a wide rectangle from flailing.overflow-hidden.origin-* and transform pairings, which is exactly the kind of variation utilities are good at.translate-y that must match it finally live in the same class list.forwards animations minted as --animate-* tokens; the ping and glow need no animation at all.perspective-*, transform-3d, rotate-x-* and translate-z-*, so this port needs almost no arbitrary values.rotate3d peel and a fanning stack. backface-hidden and transform-3d are core utilities, so the three-element scene/card/face structure ports without a single custom rule.backdrop-blur-* is a core utility, so the whole glass recipe is four tokens: translucent background, blur, hairline border, shadow.before: layer whose opacity (or position) changes on hover.group-hover: transform on a panel clipped by the card's overflow-hidden.group-hover:opacity-35 plus hover:opacity-100 on the same element.group-hover: transform.grayscale, saturate-* and isolate are all core utilities, so only the filter chains stay arbitrary.clip-path: circle(), replacing the source's tangled box-shadow workaround.animation-play-state has no utility, so it rides as an arbitrary property, which is exactly the right call.before: layer behind the label; the invert variant is the one that needs a stacking context to behave.after: bars scaled from zero; only the fill changes.aria-hidden.hover: variants — hover:scale-105, hover:-translate-y-2, transition-transform, duration-300. Where a utility does not exist, the demos use arbitrary values in square brackets: hover:[background-size:100%_2px] for the underline draw, [transform-style:preserve-3d] for the flip cards, [backface-visibility:hidden], and bg-clip-text text-transparent for gradient text. The few animated presets — the glitch in demo 02, the neon flicker in 06, the Ken Burns pans in 23 — declare an @keyframes block and reference it with animate-[name_2s_infinite]. So you copy the markup as-is; the only thing outside utilities is a small keyframes definition, which each demo ships alongside its class list. No plugin or config change is required beyond a standard Tailwind build.bg-gradient-to-r from-pink-500 to-violet-500, clip that background to the glyph shapes with bg-clip-text, then make the real text colour invisible with text-transparent so only the clipped gradient shows through. On hover the demos animate either the background position (hover:bg-[position:100%] with a wide bg-[length:200%]) for a wipe, or the hue for the rainbow shift. The common failure is forgetting text-transparent — the solid text then paints over the gradient and nothing appears to change. The second gotcha is that clipped text has no visible fill in forced-colours or high-contrast mode, so keep the copy meaningful as plain text and never rely on the gradient to convey state.hover:-only effect like the fill wipe in demo 10 or the card lift in demo 18 stays active after the finger lifts. That is expected browser behaviour, not a Tailwind bug. The reliable fix is to gate the effect behind a pointer query so it only applies to devices that truly hover — wrap the styles in @media (hover: hover), or in Tailwind use the built-in hover: which the framework can compile with the hover-capability check when you set future.hoverOnlyWhenSupported. For anything that reveals content, such as the slide reveal in demo 17, do not hide information behind hover alone — pair it with a focus or tap state so touch users can still reach it, otherwise the content is unreachable without a mouse.motion-reduce: variant on the moving utilities. For the Ken Burns pans in demo 23, the neon flicker in 06, and the glitch in 02, add motion-reduce:animate-none so the loop stops, and for transform hovers add motion-reduce:transition-none or motion-reduce:transform-none so the tilt in 13 or the 3D press in 11 settles instead of jumping. The instant, information-carrying hovers — an underline appearing, a nav highlight filling — are fine to keep because they are short and communicate state rather than decorate. The rule of thumb: if the motion is a loop or a large positional move, honour reduced-motion; if it is a sub-200ms state change, leaving it is acceptable. Test by toggling the OS reduce-motion setting and confirming the page is calm.perspective value on the container — the demos use an arbitrary property like [perspective:1000px] on the wrapper — which is what turns a 2D rotate into a foreshortened 3D lean. Without it, hover:[transform:rotateY(12deg)] looks like a flat skew. Second, for the flips in demo 14, the two faces share a parent with [transform-style:preserve-3d] and each face gets [backface-visibility:hidden] so the back is not mirrored through the front. The back face is pre-rotated [transform:rotateY(180deg)] and the parent rotates on hover. The frequent bug is applying perspective to the rotating element itself instead of its parent, which resets the vanishing point every frame and produces a warping wobble. Keep perspective on the stationary container and rotate the child.[background-size:0%_2px], pinned to the bottom with [background-position:0_100%] and told not to tile with bg-no-repeat. On hover you animate the width to full: hover:[background-size:100%_2px], and transition-[background-size] drives the draw. Centre-expand variants start the position at 50%; two-tone versions layer two gradients. This avoids a pseudo-element entirely, which matters because Tailwind cannot easily style ::after without arbitrary variants. The one pitfall is transitioning all instead of just background-size — that animates unrelated properties and can cause a visible reflow — so name the property explicitly and keep bg-no-repeat or the line tiles across the text.translate driven by that value and springs back on pointerleave. Everything else in the collection is CSS-only. Two things to watch: throttle the pointer handler with requestAnimationFrame so you are not thrashing layout on every mouse event, and scope the listener to the container rather than the whole document so trails do not appear site-wide. On touch there is no cursor, so guard the script behind a pointer-fine check and let those elements render as ordinary static components.@keyframes animations force constant repaints and drain battery on laptops. Do not put a big transform hover on a primary form submit or a critical nav link where a sudden lift or wipe reads as instability rather than polish. And never rely on colour-only hover, such as the duotone grade in demo 21, to signal an actionable state, since it disappears for colour-blind users and in forced-colours mode.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.