33 Tailwind CSS Card Hover Effects
19 / 33

All 33 in 33 Tailwind CSS Card Hover Effects

  1. 01Tailwind 3D Tilt & Parallax Card with Depth Layers
  2. 02Tailwind Glowing Gradient & Glassmorphic Border Card
  3. 03Tailwind Image Zoom Card with Slide-Up Content Reveal
  4. 04Tailwind 3D Flip Card (Front to Back) with backface-visibility
  5. 05Tailwind Sibling De-emphasis Pricing Grid with has-hover
  6. 06Tailwind Minimalist Elevation Card with Layered Dynamic Shadows
  7. 07Tailwind Elastic Lift Card with Spring Cubic-Bezier
  8. 08Tailwind Animated Conic Gradient Border Card with @property
  9. 09Tailwind Stacked Layer Reveal Card (Fanned Risograph Deck)
  10. 10Tailwind Holographic Foil Shimmer Card with mix-blend-mode
  11. 11Tailwind Curtain Reveal Card (Parting Velvet Halves)
  12. 12Tailwind Corner Peel Card with clip-path Triangles
  13. 13Tailwind Neon Sign Card with Layered Text-Shadow Glow
  14. 14Tailwind CRT Scanline Terminal Card with Sweeping Beam
  15. 15Tailwind Depth Parallax Landscape Card with Layer Multipliers
  16. 16Tailwind Cursor Spotlight Card with Masked Border Highlight
  17. 17Tailwind 3D Tilt Product Card with Specular Glare
  18. 18Tailwind Slide-Up Panel Card with Peek Header Swap
  19. 19Tailwind Credit Card Flip with Magnetic Strip & CVV
  20. 20Tailwind RGB Channel-Split Glitch Card
  21. 21Tailwind Rotating Conic Aura Card with Blurred Gradient Bloom
  22. 22Tailwind Blob-to-Rectangle Border Morph Card
  23. 23Tailwind Magnetic Float Orb Card with Pointer Attraction
  24. 24Tailwind Typewriter Reveal Card with Steps Animation & Caret
  25. 25Tailwind Magazine Overlay Slide Card (Full-Face Panel Takeover)
  26. 26Tailwind Breathing Film Grain Card with SVG Turbulence Noise
  27. 27Tailwind Frosted Glass Intensify Card with Deepening Backdrop Blur
  28. 28Tailwind Blueprint Reveal Card with Circular clip-path Wipe
  29. 29Tailwind Cursor-Anchored Shockwave Ripple Card
  30. 30Tailwind Color-Burn Ignition Card with Grayscale-to-Fire Hover
  31. 31Tailwind Prismatic Light Sweep Card with Screen Blend Bar
  32. 32Tailwind Book Cover Open Card with Hinged 3D Rotation
  33. 33Tailwind Drifting Aurora Ribbons Card with Blurred Gradient Bands
Pure TailwindMIT licensed

Tailwind Credit Card Flip with Magnetic Strip & CVV

The fintech variant of the flip: a platinum card front with number, holder and expiry, turning to a back face with magnetic strip and CVV. Geometry identical to demo 04 — the interesting difference is layout, and how a full-bleed strip is done with negative margin utilities.

Live Demo
Plain CSSTailwind v4
Try it

Untitled UI Pro: 5,000+ React + Tailwind CSS v4 components · from $349 one-time

Untitled UI React · Affiliate link

Get Untitled UI Pro

The code

<section class="tch-19 w-full min-h-svh grid place-items-center bg-tch19-bg font-tch19-sans p-8 [perspective:1500px]">
  <div tabindex="0" class="group w-[330px] h-[440px] cursor-pointer outline-none rounded-[20px] focus-visible:outline-3 focus-visible:outline-tch19-acc focus-visible:outline-offset-4">
    <div class="relative size-full transform-3d transition-transform duration-700 ease-[cubic-bezier(0.4,0.2,0.2,1)] group-hover:rotate-y-180 group-focus-within:rotate-y-180 motion-reduce:transition-none motion-reduce:group-hover:rotate-y-0 motion-reduce:group-focus-within:rotate-y-0">
      <div class="absolute inset-0 rounded-[20px] overflow-hidden backface-hidden p-10 flex flex-col justify-between shadow-[0_20px_45px_rgb(0_0_0/0.45)] bg-[linear-gradient(160deg,#12806a,#064237)] text-tch19-front-ink motion-reduce:transition-opacity motion-reduce:duration-300 motion-reduce:group-hover:opacity-0">
        <div class="flex justify-between items-center">
          <div class="grid place-items-center size-11 rounded-xl bg-tch19-front-ink text-tch19-front-deep font-extrabold text-xl">◈</div>
          <span class="font-tch19-mono text-[0.75rem] tracking-[0.2em]">PLATINUM</span>
        </div>
        <div class="font-tch19-mono text-[1.4rem] tracking-[0.16em] tabular-nums">4921 ·· 7755 ·· 0042</div>
        <div class="flex justify-between items-end text-[0.78rem]">
          <span class="font-semibold tracking-[0.08em] uppercase">A. Marlowe</span><span class="tabular-nums">12/29</span>
        </div>
      </div>
      <div class="absolute inset-0 rounded-[20px] overflow-hidden backface-hidden rotate-y-180 p-10 flex flex-col justify-between shadow-[0_20px_45px_rgb(0_0_0/0.45)] bg-[linear-gradient(160deg,#1a1f29,#0c0f14)] text-tch19-back-ink pointer-events-none group-hover:pointer-events-auto group-focus-within:pointer-events-auto motion-reduce:rotate-y-0 motion-reduce:opacity-0 motion-reduce:transition-opacity motion-reduce:duration-300 motion-reduce:group-hover:opacity-100">
        <div class="h-[46px] -mx-10 bg-black"></div>
        <h2 class="font-extrabold text-[1.6rem] leading-[1.1]">Flip to<br>the back</h2>
        <p class="text-[0.85rem] leading-[1.6] text-tch19-back-mut">Same card, two faces. A full 180° rotation reveals account details on the reverse.</p>
        <span class="self-end font-tch19-mono font-medium tracking-[0.2em] px-3.5 py-1.5 rounded-md bg-tch19-back-chip text-tch19-back-deep tabular-nums">··· 309</span>
      </div>
    </div>
  </div>
</section>
@import "tailwindcss";

@theme {
  --color-tch19-bg: #0e1116;
  --color-tch19-bg: oklch(0.15 0.01 250);
  --color-tch19-front-ink: #eafff7;
  --color-tch19-front-ink: oklch(0.97 0.02 165);
  --color-tch19-front-deep: #064237;
  --color-tch19-front-deep: oklch(0.32 0.07 168);
  --color-tch19-back-ink: #dfe4ec;
  --color-tch19-back-ink: oklch(0.9 0.01 255);
  --color-tch19-back-mut: #9aa3b2;
  --color-tch19-back-mut: oklch(0.69 0.02 255);
  --color-tch19-back-chip: #e8ecf3;
  --color-tch19-back-chip: oklch(0.93 0.008 255);
  --color-tch19-back-deep: #0c0f14;
  --color-tch19-back-deep: oklch(0.13 0.01 250);
  --color-tch19-acc: #12806a;
  --color-tch19-acc: oklch(0.52 0.1 168);
  --font-tch19-sans: 'Libre Franklin', system-ui, sans-serif;
  --font-tch19-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

.tch-19 {
  width: 100%;
  min-height: 100svh;
}

Setup — do this once per project

Skip this if your project already runs Tailwind v4.

1Load Tailwind
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>

Compiles in the browser — perfect for a CodePen or a quick test, not for production.

2Add the stylesheetRequiredthe @theme block is what makes the custom utilities exist
@import "tailwindcss";

@theme {
  --color-tch19-bg: #0e1116;
  --color-tch19-bg: oklch(0.15 0.01 250);
  --color-tch19-front-ink: #eafff7;
  --color-tch19-front-ink: oklch(0.97 0.02 165);
  --color-tch19-front-deep: #064237;
  --color-tch19-front-deep: oklch(0.32 0.07 168);
  --color-tch19-back-ink: #dfe4ec;
  --color-tch19-back-ink: oklch(0.9 0.01 255);
  --color-tch19-back-mut: #9aa3b2;
  --color-tch19-back-mut: oklch(0.69 0.02 255);
  --color-tch19-back-chip: #e8ecf3;
  --color-tch19-back-chip: oklch(0.93 0.008 255);
  --color-tch19-back-deep: #0c0f14;
  --color-tch19-back-deep: oklch(0.13 0.01 250);
  --color-tch19-acc: #12806a;
  --color-tch19-acc: oklch(0.52 0.1 168);
  --font-tch19-sans: 'Libre Franklin', system-ui, sans-serif;
  --font-tch19-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

.tch-19 {
  width: 100%;
  min-height: 100svh;
}
3Fonts used by this demooptional — skip if you have your own type stack
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@400;600;800&family=IBM+Plex+Mono:wght@400;500&display=swap">

What changed in the port

Which parts became utilities, which stayed CSS, and why.

  • -mx-10 cancelling the face's p-10 is the port's small pleasure: the bleed is stated in the same scale as the padding it defeats, so changing one forces you to see the other.
  • The original put inline style="…" attributes in its markup for two rows. Those became flex justify-between items-center utilities — a reminder that inline styles in a CSS demo are usually a missing class.
  • UI change from the CSS original: the card is focusable with a ring, flips on group-focus-within:, uses tabular-nums so the digits align, and cross-fades under reduced motion.
Paste this into ChatGPT, Claude, Cursor, or any coding assistant. The block below is pre-framed with everything the AI needs to integrate this demo into your project — markup, styles, scoping notes, and the source URL. Hit Copy and paste straight into your chat.
Here's a working CSS demo from CodeFronts. Use it as-is or adapt to your framework. All classes are scoped under a unique prefix so the code won't collide with your existing styles. MIT licensed.
Demo: Tailwind Credit Card Flip with Magnetic Strip & CVV
Source: https://codefronts.com/motion/tailwind-css-card-hover-effects/tailwind-credit-card-flip-hover-effect/

The fintech variant of the flip: a platinum card front with number, holder and expiry, turning to a back face with magnetic strip and CVV. Geometry identical to demo 04 &mdash; the interesting difference is layout, and how a full-bleed strip is done with negative margin utilities.
## HTML
```html
<section class="tch-19 w-full min-h-svh grid place-items-center bg-tch19-bg font-tch19-sans p-8 [perspective:1500px]">
  <div tabindex="0" class="group w-[330px] h-[440px] cursor-pointer outline-none rounded-[20px] focus-visible:outline-3 focus-visible:outline-tch19-acc focus-visible:outline-offset-4">
    <div class="relative size-full transform-3d transition-transform duration-700 ease-[cubic-bezier(0.4,0.2,0.2,1)] group-hover:rotate-y-180 group-focus-within:rotate-y-180 motion-reduce:transition-none motion-reduce:group-hover:rotate-y-0 motion-reduce:group-focus-within:rotate-y-0">
      <div class="absolute inset-0 rounded-[20px] overflow-hidden backface-hidden p-10 flex flex-col justify-between shadow-[0_20px_45px_rgb(0_0_0/0.45)] bg-[linear-gradient(160deg,#12806a,#064237)] text-tch19-front-ink motion-reduce:transition-opacity motion-reduce:duration-300 motion-reduce:group-hover:opacity-0">
        <div class="flex justify-between items-center">
          <div class="grid place-items-center size-11 rounded-xl bg-tch19-front-ink text-tch19-front-deep font-extrabold text-xl">◈</div>
          <span class="font-tch19-mono text-[0.75rem] tracking-[0.2em]">PLATINUM</span>
        </div>
        <div class="font-tch19-mono text-[1.4rem] tracking-[0.16em] tabular-nums">4921 ·· 7755 ·· 0042</div>
        <div class="flex justify-between items-end text-[0.78rem]">
          <span class="font-semibold tracking-[0.08em] uppercase">A. Marlowe</span><span class="tabular-nums">12/29</span>
        </div>
      </div>
      <div class="absolute inset-0 rounded-[20px] overflow-hidden backface-hidden rotate-y-180 p-10 flex flex-col justify-between shadow-[0_20px_45px_rgb(0_0_0/0.45)] bg-[linear-gradient(160deg,#1a1f29,#0c0f14)] text-tch19-back-ink pointer-events-none group-hover:pointer-events-auto group-focus-within:pointer-events-auto motion-reduce:rotate-y-0 motion-reduce:opacity-0 motion-reduce:transition-opacity motion-reduce:duration-300 motion-reduce:group-hover:opacity-100">
        <div class="h-[46px] -mx-10 bg-black"></div>
        <h2 class="font-extrabold text-[1.6rem] leading-[1.1]">Flip to<br>the back</h2>
        <p class="text-[0.85rem] leading-[1.6] text-tch19-back-mut">Same card, two faces. A full 180° rotation reveals account details on the reverse.</p>
        <span class="self-end font-tch19-mono font-medium tracking-[0.2em] px-3.5 py-1.5 rounded-md bg-tch19-back-chip text-tch19-back-deep tabular-nums">··· 309</span>
      </div>
    </div>
  </div>
</section>
```
## CSS
```css
@import "tailwindcss";

@theme {
  --color-tch19-bg: #0e1116;
  --color-tch19-bg: oklch(0.15 0.01 250);
  --color-tch19-front-ink: #eafff7;
  --color-tch19-front-ink: oklch(0.97 0.02 165);
  --color-tch19-front-deep: #064237;
  --color-tch19-front-deep: oklch(0.32 0.07 168);
  --color-tch19-back-ink: #dfe4ec;
  --color-tch19-back-ink: oklch(0.9 0.01 255);
  --color-tch19-back-mut: #9aa3b2;
  --color-tch19-back-mut: oklch(0.69 0.02 255);
  --color-tch19-back-chip: #e8ecf3;
  --color-tch19-back-chip: oklch(0.93 0.008 255);
  --color-tch19-back-deep: #0c0f14;
  --color-tch19-back-deep: oklch(0.13 0.01 250);
  --color-tch19-acc: #12806a;
  --color-tch19-acc: oklch(0.52 0.1 168);
  --font-tch19-sans: 'Libre Franklin', system-ui, sans-serif;
  --font-tch19-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

.tch-19 {
  width: 100%;
  min-height: 100svh;
}
```

How this works

Same three-element geometry as demo 04. Stage holds [perspective:1500px], flipper holds transform-3d and the rotation, faces hold backface-hidden with the back pre-rotated. Once you have this skeleton, the two demos differ only in content.

The strip is a negative-margin bleed. The back face pads its content by 2.4rem; the black strip needs to touch both edges. -mx-10 cancels that padding exactly — the utility answer to margin: 0 -2.4rem.

The flip is keyboard-reachable. Because the back holds the CVV, the card is tabindex="0" and group-focus-within: turns it, which is the difference between a demo and something shippable in a banking UI.

Make it yours

  • Face palettes are independent — --color-tch19-front-* and --color-tch19-back-* share no tokens.
  • Flip speed: 700ms reads premium; 400ms reads like a card game.
  • Swap the number for a masked form (•••• 0042) if the card represents a real stored instrument.

Gotchas — read before shipping

  • backface-hidden on both faces, every time.
  • perspective on the stage, never the flipper.
  • Do not ship a card with real PAN data in the DOM; this is a visual pattern, and the number here is fictional.
  • Under motion-reduce: cross-fade the faces instead of rotating — a 700ms spin is exactly the motion the preference exists to suppress.

Browser support

ChromeSafariFirefoxEdge
111+16.4+128+111+

3D transforms and backface-visibility are universally supported; rotate-y-* and transform-3d need Tailwind v4.

Techniques used in this demo

Search CodeFronts

Loading…