Skip to content
Primitives

Card

Signature surface with corner-bracket reticles and a mono index header.

● LIVE
SEC-04
ICE Layer
Subnet secure
Secure
Black ICE holding across all four nodes. No trace detected.
npx shadcn@latest add https://okibi.cndr.dev/r/card.json

Installation

Install the theme first, then add the component:

npx shadcn@latest add https://okibi.cndr.dev/r/card.json

Copy the source from the Code tab above into components/ui/card.tsx. It uses the cn helper and the okibi theme tokens — install the theme first if you haven't.

Usage

import {
  Card,
  CardContent,
  CardDescription,
  CardFooter,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"

<Card>
  <CardHeader>
    <CardTitle>Access Request</CardTitle>
    <CardDescription>Submit credentials for clearance.</CardDescription>
  </CardHeader>
  <CardContent>Fielded body…</CardContent>
  <CardFooter>Docked actions…</CardFooter>
</Card>

Anatomy

A Card composes a header band, a body, and a footer band. The header grid holds an optional mono index, the title, the description, and a top-right action cell; CardContent and CardFooter are separated by token hairlines.

<Card>
  <CardHeader>
    <CardIndex />
    <CardTitle />
    <CardDescription />
    <CardAction />
  </CardHeader>
  <CardContent />
  <CardFooter />
</Card>

Examples

Form

Compose the header / content / footer slots into a self-contained form panel — index, title, a fielded body and a docked action row.

● LIVE
SEC // 01
Access Request
Submit credentials for clearance.

Stat panel

Compose the surface as an instrument readout — a mono index header over a large tabular value, a unit, and a signal delta line — rather than a form.

● LIVE
FLUX // 0x2C
Core Output
847kW
increase 12.4%vs prev cycle

Clickable

Wrap the surface in a real anchor for a whole-card link: a visible focus ring and a hover lift make it a proper, keyboard-navigable target (no role/tabindex hacks).

● LIVE

Accessibility

  • A presentational surface — Card is a plain div with no implicit role, so semantics come from the content you place inside it.
  • The four corner-bracket reticles are decorative: each carries aria-hidden and pointer-events-none, so assistive tech never announces them.
  • CardTitle renders a div, not a heading. Pass real heading content (or render an h2/h3) so a card region is reachable in the heading outline.
  • Every slot exposes a data-slot hook (card, card-header, card-title, card-action, …) for styling and test queries, not for a11y semantics.
  • There is no built-in clickable affordance — if the whole card is a target, wrap the heading in a link and add your own focus ring rather than putting a handler on the surface.

Guidelines

Do

  • Give CardTitle true heading content so the surface lands in the page outline.
  • Dock controls into CardAction — the header grid reserves the top-right cell so the title still wraps cleanly on narrow cards.
  • Leave breathing room around tiled cards; the 4px 4px signal shadow and corner reticles need the strong border and a neighbor gap to read.

Don't

  • Do not hang an onClick on the bare Card div and call it a button — wire a real link or button inside instead.
  • Do not nest a Card inside a Card; the doubled borders and reticles read as noise, not hierarchy.
  • Do not override the sharp corners or hard shadow with rounding or blur — that breaks the HUD surface language.

On this page