Shine Sweep
A copy-paste cards & hover component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Cards & HoverHTMLCSSany framework
Copy into your project
HTML
<!-- Shine Sweep — diagonal shine sweep on hover -->
<div class="nuda-shine-sweep-card" tabindex="0">
<h3 class="nuda-shine-sweep-card__title">Shine Sweep</h3>
<p class="nuda-shine-sweep-card__desc">Diagonal shine on hover</p>
</div>CSS
/* ── Shine Sweep ─────────────────────────────────────────────
A skewed highlight sweeps across the card on hover/focus.
Customize:
--nuda-sw-shine : shine color
--nuda-sw-speed : sweep duration
──────────────────────────────────────────────────────────── */
.nuda-shine-sweep-card {
--nuda-sw-shine: rgba(228, 255, 84, 0.25);
--nuda-sw-speed: 0.85s;
position: relative;
width: 280px;
padding: 28px 20px;
background: linear-gradient(135deg, #18181b, #09090b);
border: 1px solid rgba(228, 255, 84, 0.15);
border-radius: 16px;
color: #fafafa;
text-align: center;
overflow: hidden;
cursor: pointer;
}
.nuda-shine-sweep-card:focus-visible {
outline: 2px solid #e4ff54;
outline-offset: 3px;
}
.nuda-shine-sweep-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 60%;
height: 100%;
background: linear-gradient(100deg, transparent, var(--nuda-sw-shine), transparent);
transform: translateX(-180%) skewX(-18deg);
pointer-events: none;
}
.nuda-shine-sweep-card:hover::before,
.nuda-shine-sweep-card:focus-visible::before {
animation: nuda-shine-sweep-card var(--nuda-sw-speed) ease forwards;
}
.nuda-shine-sweep-card__title {
position: relative;
font-size: 1.05rem;
font-weight: 700;
margin: 0;
}
.nuda-shine-sweep-card__desc {
position: relative;
font-size: 0.85rem;
opacity: 0.6;
margin: 6px 0 0;
}
@keyframes nuda-shine-sweep-card {
to { transform: translateX(280%) skewX(-18deg); }
}
/* ── Accessibility ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
.nuda-shine-sweep-card::before { display: none; }
}How to use Shine Sweep
Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.
Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.