Starter
Everything you need to launch.
A diagonal sheen crosses the whole card on hover, the same trick as the shine button but scaled up. Works especially well on dark cards and pricing tiers.
Also known as: card shimmer hover, glossy card, holographic card.
Everything you need to launch.
<article class="hfx-card-shine">
<div class="hfx-card-shine-body">
<h3>Starter</h3>
<p>Everything you need to launch.</p>
</div>
</article>.hfx-card-shine {
--c: var(--hfx-color, #3b82f6);
font-size: var(--hfx-size, 16px);
width: 15em;
border-radius: 0.75em;
overflow: hidden;
background: #fff;
border: 1px solid color-mix(in srgb, #000 10%, transparent);
color: #1f2937;
font-family: system-ui, sans-serif;
position: relative;}
.hfx-card-shine::after {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(115deg, transparent 35%, color-mix(in srgb, var(--c) 35%, transparent) 50%, transparent 65%);
transform: translateX(-100%);
transition: transform 0.7s ease;
pointer-events: none;
}
.hfx-card-shine:hover::after { transform: translateX(100%); }
.hfx-card-shine-body {
padding: 0.9em 1em 1.1em;
}
.hfx-card-shine h3 {
margin: 0 0 0.25em;
font-size: 1.05em;
}
.hfx-card-shine p {
margin: 0;
font-size: 0.85em;
color: #6b7280;
line-height: 1.4;
}
@media (prefers-reduced-motion: reduce) {
.hfx-card-shine, .hfx-card-shine *, .hfx-card-shine::before, .hfx-card-shine::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}--hfx-color on the element or a parent.
Currently previewing #3b82f6.--hfx-size. Every other dimension is in
em, so the whole thing scales together. Currently previewing 16px.transition or animation
shorthand. Staggered delays are relative, so they keep their rhythm.