Krizaka UI
Krizaka UI

Glow card

A card ringed by the brand: its border is a still hairline of the brand gradient, a step brighter under the pointer or the focus, fuller on a featured card. Nothing follows the pointer, nothing turns (krizaka-ui#393).

Web · ✓Mobile · n/aBureau · n/aBêtaMise en page
Niveau de support
Bêta
Taille
0.7 kB gzip, budget 1.9 kB
Qui l'utilise
4 fichiers des produits et sites en production l'importent (Sovkora : 2) Compté dans l'inventaire daté du 2026-11-23.
import { GlowCard } from "@krizaka/ui/glow-card";

Web uniquement — React, depuis @krizaka/ui/glow-card. Bêta : son API peut encore changer à une version mineure.

  • Mobile · n/a. A block of a public site's page; an app screen on a phone is built from Screen, Header and Card. → Card
  • Bureau · n/a. A public site's page, not a window of the Mac app.

Pourquoi il est là. Used by Sovkora.

Quand l’utiliser

  • Cards that invite a choice: plans, products, the entry points of a landing page.
  • One featured card among others (alive): its ring turns at rest.

Quand ne pas l’utiliser

  • For the cards of an app's lists and feeds: a calm card reads better there.À la place : Card
  • Around content the reader studies (a form, a table): a coloured ring competes with it.

Installation

Installer

npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcss

Styles

@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";

Importer

import { GlowCard } from "@krizaka/ui/glow-card";

Exemples

Plans

Three plans: each ring brightens under the pointer; the featured one's ring is fuller at rest.

asChild on an <a>, glow="border": the focus brightens the ring.

Spotlight only

glow="spotlight" is deprecated (krizaka-ui#393): the bloom is retired, the card draws no ring.

Props

A card ringed by the brand: a still hairline of its gradient, a step brighter under the pointer. Content is yours.

PropTypeDéfautDescription
alivebooleanfalseA featured card: the ring is fuller at rest. It never turns.
asChildboolean—Renders your element (a link, an article) with the card's look and behaviour.
glow"both" | "border" | "spotlight"bothborder (a still hairline ring of the brand gradient) or both. spotlight (the bloom under the pointer) is deprecated since 3.31 (krizaka-ui#393) and draws nothing.

Accessibilité

  • A decorative ring only (a pseudo-element): nothing is added to the accessibility tree; the card's semantics are yours.
  • Nothing moves or turns, with or without prefers-reduced-motion; only the ring's opacity changes, in 150 ms.
  • Its loops pause off screen and while the page settles (MotionObserver).

Clavier

TouchesAction
TabFocusing the card (or a control inside it) brightens its ring, as the pointer does.

Bonnes pratiques

  • One grid of glowing cards per page; alive on one card at most.
  • Make the whole card the link with asChild when it leads somewhere — the focus brightens its ring like the pointer.
  • Colours come from the brand (.brand-<id>): never pass one.

Générée depuis le code de @krizaka/ui 5.3.4 : son meta.ts, ses exemples et ses types.Modifier cette documentation sur GitHub

Sur cette page