Components / Motion / Glow Cards
Glow Cards beta
A grid of cards whose borders light up where the cursor passes — the glow lives in the frame, not the fill.
Cast from one mold
Every card in this grid shares tokens with every other — the glow included.
No runtime
The light is two custom properties and a mask. Nothing loads, nothing phones home.
Checked before shipping
Each part passes the same automated mold check before it joins the catalog.
Move slowly along the edges — the frame is where the light lives.
<div class="k-glow-grid"><div class="k-glow"><span class="ic"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="square" stroke-linejoin="bevel" aria-hidden="true"><path d="M12 3.5 2.5 8.5 12 13.5l9.5-5L12 3.5Z"/><path d="m2.5 12.8 9.5 5 9.5-5"/></svg></span><h3>Cast from one mold</h3><p>Every card in this grid shares tokens with every other — the glow included.</p></div><div class="k-glow"><span class="ic"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="square" stroke-linejoin="bevel" aria-hidden="true"><path d="M13 2 4 14h6l-1 8 9-12h-6l1-8Z"/></svg></span><h3>No runtime</h3><p>The light is two custom properties and a mask. Nothing loads, nothing phones home.</p></div><div class="k-glow"><span class="ic"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="square" stroke-linejoin="bevel" aria-hidden="true"><circle cx="12" cy="12" r="8.5"/><path d="m8.5 12.2 2.4 2.4 4.8-5"/></svg></span><h3>Checked before shipping</h3><p>Each part passes the same automated mold check before it joins the catalog.</p></div></div> <p style="font-size:12.5px;color:var(--k-ink-3);margin-top:9px">Move slowly along the edges — the frame is where the light lives.</p>
/* KATA Glow Cards — the border warms where the cursor passes. */
.k-glow-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px;font-family:var(--k-font);color:var(--k-ink)}
.k-glow{position:relative;background:var(--k-bg);border:1px solid var(--k-line);border-radius:14px;padding:18px}
.k-glow::before{content:"";position:absolute;inset:-1px;border-radius:inherit;padding:1.5px;background:radial-gradient(190px circle at var(--mx,50%) var(--my,50%), var(--k-accent), transparent 70%);-webkit-mask:linear-gradient(var(--k-on-color) 0 0) content-box, linear-gradient(var(--k-on-color) 0 0);-webkit-mask-composite:xor;mask:linear-gradient(var(--k-on-color) 0 0) content-box, linear-gradient(var(--k-on-color) 0 0);mask-composite:exclude;opacity:0;transition:opacity .25s;pointer-events:none}
.k-glow:hover::before{opacity:1}
.k-glow .ic{width:36px;height:36px;border-radius:10px;background:var(--k-accent-bg);color:var(--k-accent-ink);display:flex;align-items:center;justify-content:center;margin-bottom:11px}
.k-glow h3{font-size:14.5px;font-weight:600}
.k-glow p{font-size:12.5px;line-height:1.75;color:var(--k-ink-2);margin-top:5px}
@media (max-width:640px){.k-glow-grid{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){.k-glow::before{display:none}}
// KATA Glow Cards — feeds each card the pointer's position.
document.querySelectorAll('.k-glow').forEach(function (card) {
card.addEventListener('pointermove', function (e) {
var r = card.getBoundingClientRect();
card.style.setProperty('--mx', (e.clientX - r.left) + 'px');
card.style.setProperty('--my', (e.clientY - r.top) + 'px');
});
});
Installation
CLI
node kata-ui.mjs add glow-cards
Writes the part’s CSS and JS into your project. New to the CLI? See the CLI doc.
Manual
- Load
tokens.cssonce, before any part. - Copy the CSS tab into your stylesheet.
- Copy the HTML where it belongs. The part has a script — include it after the markup; it initializes itself.
Usage
For feature grids that need life without noise: at rest the cards are plain catalog cards, and only the border near the cursor warms. The script tracks the pointer per card and feeds two custom properties; the frame does the rest with a masked radial gradient.
Accessibility
The glow is a border treatment on cards that read perfectly without it — no information rides on the light. It follows the pointer only, so keyboard and touch users lose nothing, and it is off under prefers-reduced-motion.
Anatomy
The public surface of this part, read from its own source. Class names are the API — the CSS tab above is the full contract.
.k-glow-grid | class |
.k-glow | class |
.ic | class |
aria-hidden | ARIA |
Related parts
Accordion Gallery beta
Five scenes in a row; the one you touch opens up and tells its caption.
Aurora beta
A slow wash of color behind a hero — the accent and the core, drifting under glass.
Beam border beta
A single point of light travels the edge of a card. The beam is the core color — the one accent, in motion.
Blur In beta
Words arrive out of focus and sharpen one after another, like eyes adjusting.