# TerminalCard

> Card with a primary header band: title and optional meta in the terminal text style (LisaTerminal Paper), body below in a framed light-gray panel.

- Status: alpha
- Group: structure
- Page: https://www.digitaltableteur.com/design-system/components/terminal-card
- Contract: https://www.digitaltableteur.com/contracts/v1/TerminalCard.contract.json

## When to use

Card with a primary header band: title and optional meta in the terminal text style (LisaTerminal Paper), body below in a framed light-gray panel.

## When not to use

The contract records no forbidden uses.

## Look-alikes

The contract names no look-alike with a deciding condition.

## Props

| Prop | Type | Default | Description | Required |
| --- | --- | --- | --- | --- |
| `title` | `string` | none | Card title, set in the terminal text style on the primary header band. | Yes |
| `meta` | `string` | none | Short detail at the end of the header band, such as a duration. | No |
| `href` | `string` | none | Destination. The title becomes a link and its hit area stretches over the whole card; the title stays the link's accessible name. | No |
| `headingLevel` | `"2" \| "3" \| "4" \| "5" \| "6"` | none | Renders the title as a heading of this level. Without it the title is plain text, for cards inside a section whose own heading names them. | No |
| `as` | `"div" \| "li" \| "article"` | `div` | Root element: li inside a list, article for a standalone item. Defaults to `div`. | No |
| `children` | `React.ReactNode` | none | Body content under the header band. | No |
| `className` | `string` | none | Extra class names on the root. | No |

## Variants

- Allowed `headingLevel` values: `2`, `3`, `4`, `5`, `6`.
- Allowed `as` values: `div`, `li`, `article` (default `div`).

## Invalid combinations

The contract records no invalid combinations.

## Keyboard

| Key | Behaviour |
| --- | --- |
| Tab | Reaches the title link when href is set. |
| Enter | Follows it. Without href the card has no tab stop. |

## Rules

Every item under When not to use is a MUST NOT. MUST and SHOULD follow RFC 2119.

| Level | Rule | How it is checked |
| --- | --- | --- |
| MUST | ARIA: With href the title is the only link and its accessible name; a ::after overlay stretches its hit area over the whole card, and the card shows the focus ring. | Not yet verified: no evidence record. WCAG 4.1.2. |
| MUST | ARIA: The title is plain text by default; headingLevel renders it as h2 to h6 when the card needs its own outline entry. | Not yet verified: no evidence record. WCAG 4.1.2. |
| MUST | ARIA: As="li" makes the card the list item itself, so a list of cards keeps list semantics. | Not yet verified: no evidence record. WCAG 4.1.2. |
| MUST | Required stories produce no axe violations at the configured severity. | Automated by `npm run test:stories:matrix:ci`. WCAG 2.5.8. |
| MUST | The accessibility tree (role, name, state) matches the committed snapshot for every required story. | Automated by `npm run test:stories:matrix:ci`. WCAG 1.3.1, 4.1.2. |
| MUST | The component remains legible and operable under a real browser forced-colors: active pass. | Automated by `npm run test:stories:hc`. |
| MUST | Every documented keyboard interaction works as specified. | Not yet verified: no evidence record. WCAG 2.1.1, 2.1.2. |

## Install and import

- In-repo only. TerminalCard is not exported from `@digitaltableteur/react`, so there is no public import path.
- Alpha components are internal and never exported.

## Links

- Machine-readable contract (Design System Contract 1.0): https://www.digitaltableteur.com/contracts/v1/TerminalCard.contract.json
- Markdown version of this page: https://www.digitaltableteur.com/design-system/components/terminal-card.md
- Component index as JSON: https://www.digitaltableteur.com/design-system/components.json
- All components: https://www.digitaltableteur.com/design-system/components
- Source: The implementation lives in a private repository. This page, its Markdown twin and the contract are generated from it at build time and are the public source of truth.
