本文へ移動
日本語
「グロータブカード」は Pro に含まれます。解除するとプレビューが表示されます。

仕組み

The card is two shapes on one dark ground: a tab on the right of the top edge and the body under it, its top-right corner square so the tab runs into it. A radial gradient draws the concave corner where the tab's left side curves into the body, and one drop-shadow filter shadows both as a single outline, so the shape stays crisp at any size. The light is an inset panel: three blurred colour fields from the tone drift on long, offset loops (9, 11 and 13 s) and blend as light, and nine ribbon lines run across them with dashes that flow sideways at slightly different speeds. The card stays dark in both themes because the light needs a dark ground. With a link, pointing or focusing lifts the card by 4 px, deepens its shadow and turns the light to full strength.

向いている場面

  • A row of two to four outcome or feature cards on a landing page or a pricing page, each with one number worth remembering.
  • A dark section, or a light page that wants a small, bright moment.

向かない場面

  • Not for dense dashboards: the moving light competes with real data. Use a plain stat card there.

使い方

import { GlowTabCard } from './GlowTabCard.jsx'

export function Outcomes() {
  return (
    <div style={{ display: 'flex', flexWrap: 'wrap', gap: 18 }}>
      <GlowTabCard style={{ width: 200, height: 272 }} index="01" tab="Ship faster" caption="Spec-first UI" value="2.4x" valueLabel="from plan to screen" href="/case-studies/faster" />
      <GlowTabCard style={{ width: 200, height: 272 }} index="02" tab="Fewer rewrites" caption="Review rounds" value="-68%" valueLabel="per feature" tone="ember" href="/case-studies/rewrites" />
      <GlowTabCard style={{ width: 200, height: 272 }} index="03" tab="Ready to paste" caption="React components" value="210+" valueLabel="in the library" tone="violet" href="/library" />
    </div>
  )
}

プロパティ

プロパティ型既定値説明
indexstring—Short number before the tab label, such as 01, set in the mono face.
tabstring—Label on the tab. It is the card's heading and, with href or onClick, its link.
captionstring—Short line above the figure.
valuestring—The large figure, set with tabular digits.
valueLabelstring—Small label beside or under the figure.
tone'accent' | 'ember' | 'violet' | 'mint''accent'Colours of the flowing light, taken from the palette tokens: accent and secondary, chart reds and ambers, tertiary and violet, or teal and green.
hrefstring—Makes the tab label a link; a press anywhere on the card follows it.
onClick(event) => void—Without href, makes the tab label a button; a press anywhere on the card presses it.
headingLevel2 | 3 | 4 | 5 | 63Level of the heading that holds the tab label.
childrenReactNode—Extra content under the figure, such as a short note.

アクセシビリティ

  • The card is an article whose heading is the tab label. With href it holds one real link, with onClick one real button; a press anywhere on the card follows it, but the keyboard stops only once.
  • Focusing the link draws an outline round the whole card and lifts it, the same as pointing at it.
  • The light is decorative and aria-hidden. Text is near-white on a near-black ground in both themes; the caption and labels keep a contrast above 4.5:1.
  • Under reduced motion the colour fields and ribbon lines hold still and the card does not lift.

モーション

Colour fields drift on 9, 11 and 13 s loops that run back and forth; the ribbon dashes flow over 7 to 12 s. The lift takes 360 ms on the ease-out curve. Under reduced motion nothing moves.

プロジェクトに追加

Pro メンバーはプロンプトをコピーし、コーディングエージェントが無料コンポーネントと同じ手順でソースを導入します。

GlowTabCard.jsxglow-tab-card.csstokens.cssREADME.md

2 つのファイルを一緒に導入します。スタイルは tokens.css の変数を読み、予備の値も持つため、単体でも表示できます。

カード
「動く枠線カード」は Pro に含まれます。解除するとプレビューが表示されます。
「ビームボーダー」は Pro に含まれます。解除するとプレビューが表示されます。
「カード詳細とロック」は Pro に含まれます。解除するとプレビューが表示されます。