Krizaka UI
Krizaka UI

Argument card

A compact card that argues — about a third of a full card: who (icon, name, the bird in the corner), the trap in one line, facts and one short action; the long version lives on a detail page or unfolds in place.

Web · ✓Mobile · n/aBureau · n/aBêtaBlocs
Niveau de support
Bêta
Taille
4.1 kB gzip, budget 1.4 kB
Qui l'utilise
3 fichiers des produits et sites en production l'importent (krizaka.com : 1) Compté dans l'inventaire daté du 2026-11-23.
import { ArgumentCard } from "@krizaka/ui/argument-card";

Web uniquement — React, depuis @krizaka/ui/argument-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 krizaka.com.

Quand l’utiliser

  • The reasons of a product page, the building blocks of an open-source page, the options of a decision.
  • When each subject has a problem to state before its solution, and a reader who scans before reading.

Quand ne pas l’utiliser

  • When the card only leads somewhere.À la place : Link card
  • For the decisions behind a choice, compared side by side.À la place : Decision list

Installation

Installer

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

Styles

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

Importer

import { ArgumentCard } from "@krizaka/ui/argument-card";

Exemples

A building block

Compact: the duck in the corner, the trap in one line, facts, one short action and an icon action.

Unfolded in place

No detail page: panelLabel unfolds what it does, the cost and the pigeon's rule.

Three reasons

A product's reasons side by side in a grid: the hook and the way in, no panel.

The quiet hover

hover="quiet" on a grid of reasons: no glow, a lift, a ring on focus.

Props

A card that argues, compact (about a third of a full card): who (icon, name, meta; the bird small in the corner) → the problem in one line → compact facts → one short action. What it does, the bird's rule and the long version are never on the face: they live on the detail page (more) or in the card unfolded in place (panelLabel).

PropTypeDéfautDescription
hookrequis{ label: ReactNode; text: ReactNode; }—The problem in ONE line (≤ 90 characters): what a reader keeps if they read nothing else. label (The trap) is read by assistive technology before it, not shown.
titlerequisReactNode—The title: the subject (a building block, a feature, a plan).
actionsReactNode—Discreet secondary actions at the foot, on the right (an ActionBar with variant="icons").
detailsreadonly { label: ReactNode; text: ReactNode; }[]—Unfolded only: the long version, as labelled paragraphs.
factsreadonly Fact[]—Compact facts under the line: registry and version, a status said honestly.
hoverCardHover—@deprecated Since 3.31 (krizaka-ui#393): does nothing — every card has the one quiet hover. Removed in 4.0.
iconReactNode—The icon tile (a signature icon): decorative.
level4 | 2 | 33The title's level.
linkAsLinkComponent—The app's link component for internal addresses (Next's Link); an <a> otherwise.
markReactNode—Small, in the top corner: the bird whose rule it is (a Mascot of 40 px, still). Decorative.
metaReactNode—A mono line under the title (a repository, a package).
more{ href: string; label: ReactNode; }—The way in: a detail page — one short action at the foot (Details). With it, the card is only its face.
panelLabelReactNode—Without a detail page: the words that unfold the card in place (Details) — a native <details> holding the points, the rule and the long version. Ignored with more: the detail page holds them.
points{ label: ReactNode; items: readonly ReactNode[]; }—Unfolded only: what it does, as a few short points, with their label (What it does).
ruleReactNode—Unfolded only: the rule told by a bird (a MascotQuote, variant="inline").

Accessibilité

  • An article named by its title; the hook's label is read before the line (visually hidden); the fold is a native details element.
  • The way in is described by the card's title (aria-describedby), so several Read more links stay distinct.
  • One quiet hover (krizaka-ui#393): the surface and the hairline go one step up in a short colour transition — nothing moves, no light follows the pointer; a ring on the whole card when a link inside takes the keyboard focus. The panel's chevron stops under prefers-reduced-motion.

Clavier

TouchesAction
Enter / SpaceOn the panel's summary, opens or closes the long version.

Bonnes pratiques

  • The hook is ONE line (≤ 90 characters, regular weight) a reader keeps in five seconds — never three bold lines.
  • What it does, the bird's quote and the long version are never on the face: a detail page (more), or panelLabel.
  • One idea per card; one bird per idea: small in the corner (mark), its quote (rule) where the card unfolds.
  • Give each subject its hue with --kz-hue on the card (or a wrapper); the brand's accent otherwise.
  • Secondary actions as an icon ActionBar in actions; the way in as more.

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