CSS Shine Hover Card

A premium dark card with a glossy light streak that sweeps across it when hovered or focused.

  • shine
  • gloss
  • light sweep
  • hover
  • premium
  • shimmer
HTML
<a class="shine-card" href="#">
  <small>Members</small>
  <h3>Gold Pass</h3>
  <p>Early access, free shipping and priority support.</p>
</a>
CSS
.shine-card {
  position: relative;
  display: block;
  width: 230px;
  padding: 22px;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #1f2937, #0b0f19);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.6);
  color: #f8fafc;
  font-family: system-ui, sans-serif;
  text-decoration: none;
}

.shine-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s ease;
  pointer-events: none;
}

.shine-card:hover::after,
.shine-card:focus-visible::after {
  left: 130%;
}

.shine-card:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 3px;
}

.shine-card small {
  color: #fbbf24;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.shine-card h3 {
  margin: 6px 0;
  background: linear-gradient(90deg, #fde68a, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 24px;
}

.shine-card p {
  margin: 0;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .shine-card::after {
    display: none;
  }
}

About this CSS Shine Hover Card

This CSS Shine Hover Card is 66 lines of pure CSS (1.2 KB) with no JavaScript and no dependencies. It uses transitions, transforms, linear gradients and box shadows. It works in current versions of Chrome, Edge, Safari and Firefox. It works in any stack: plain HTML, React, Vue, Svelte, Astro, WordPress or Webflow.

CSS features used

Customize it

The colors in this snippet. Search and replace them to match your brand:

  • #1f2937
  • #0b0f19
  • #f8fafc
  • #fbbf24
  • #fde68a
  • #f59e0b
  • #94a3b8

How to use this shine hover card

  1. Copy the HTML and paste it where you want the element to appear.
  2. Copy the CSS into your stylesheet, or inside a <style> tag.
  3. Keep the .shine-card class name, or rename it in both places. Then tweak colors, sizes and timing to match your design.
  4. Using React or Next.js? Change class to className in the HTML. The CSS works as is, including in Tailwind projects (put it in your global stylesheet).

Building with an AI tool?

“Copy for AI” copies a short prompt for Cursor, Claude Code, Lovable, Bolt or v0. Your AI tool opens the Markdown version of this snippet and reads the HTML, CSS and setup notes there. If your tool can't open links, with the code instead. More ways to use copy CSS with AI.

Feedback