CSS Shine Hover Card
A premium dark card with a glossy light streak that sweeps across it when hovered or focused.
<a class="shine-card" href="#">
<small>Members</small>
<h3>Gold Pass</h3>
<p>Early access, free shipping and priority support.</p>
</a>
.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
- transitions
- transforms
- linear gradients
- box shadows
- gradient-clipped textIncludes the -webkit- prefix Safari still needs.
- keyboard focus styles
- reduced-motion support
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
- Copy the HTML and paste it where you want the element to appear.
- Copy the CSS into your stylesheet, or inside a
<style>tag. - Keep the
.shine-cardclass name, or rename it in both places. Then tweak colors, sizes and timing to match your design. - Using React or Next.js? Change
classtoclassNamein 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.