Skip to content

Card

ReleasedShipped in 0.3.0StorybookFigma canvas 57:1648Source
  • Use type listing for something people can open or book: a stay, an experience, or a trip, with a photo, a title, one details line and the price.
  • Turn on ShowTag for a status on the photo, such as “Confirmed”, and ShowAction for a text action such as “View”; turn ShowRating off when there are no reviews yet.
  • Use type stat in the back office for one key number, such as “Active admins 27”, in a row of 3 to 5 tiles at the top of a page.

3 more lines in use_when in src/components/Card/Card.intent.json (items 4 to 6) are Figma’s Best Practice lines, word for word. They are listed once, under “Best practice” below.

Property names. Item 2 (Figma node 239:57) is copied from Figma as written, with Figma’s spelling of the properties. The code spells them showTag and showAction and showRating.

  • For rows of data people compare or sort: use a Table.
    Instead: Table
  • To choose one option in a form: use Radiocard.
    Instead: RadioCard
  • For a stat that needs a chart or several numbers: use a content panel, not a stat tile.
    The Figma page names no alternative.

Open item: no alternative named for item 3. The item has an empty instead in Card.intent.json; the Figma page names no component there (“a content panel” is not a Horizon component).

From the release review, under “Warnings (not blocking)”, as written:

C2: dont_use_when entry 3 has an empty instead (“a content panel”, not a Horizon component). Owner: doc-generator or the designer, if a component is ever named.

Open item: pairs_with. From the release review, under “Warnings (not blocking)”, as written:

pairs_with: [“Image”] in Card.intent.json. Stories render Card alone and show no pairing; Image appears because Card uses it internally (the board records that in Composes). Named in the ruling’s “Not ruled” line, so raised as a warning and not waived. Owner: doc-generator, to confirm or empty it.

From the Figma documentation page (usage node 239:51), as written. These items aren’t carried into Card.intent.json, which has no field for them.

  • Keep every card in a grid the same width and photo ratio, so titles and prices line up.
  • One line each for title and details: they cut off with … rather than wrap.
  • Make the whole listing card clickable, and keep the Action for a second, smaller step.

Where the built component differs. Item 3 (Figma node 239:68) is copied from Figma as written. It is a design instruction, not something Card does: the card is a plain <div> (Card.tsx:60) with no role, no tabIndex, no keyboard handling and no focus style (Card.css has no :focus rule), and Figma draws no focus state. Caller attributes are spread onto the <div>, so a consumer who adds onClick gets a mouse-only target. The a11y entries in Card.intent.json do not say so. This is a documentation gap for the designer and a human, not a feature.

From the release review, under “Warnings (not blocking)”, as written:

The intent’s best practice “Make the whole listing card clickable” has no support in the component: the container is a plain <div> with no role, keyboard handling or focus style (Figma draws no focus state). A consumer who adds onClick through the spread gets a mouse-only target, and the a11y entries do not say so. Named in the ruling’s “Not ruled” line. Owner: doc-generator and a human.

Property Value What it is for
type listing something people can open or book: a stay, an experience, or a trip, with a photo, a title, one details line and the price
type stat a back office KPI tile: one key number, in a row of 3 to 5 tiles at the top of a page
  • The photo is Horizon’s Image component, a native <img>, and imageAlt (default empty, so decorative) is passed to its alt. src/components/Card/Card.tsx:62
  • The card is a plain <div> with no role; title, details and price are <p> text, so they read in DOM order. Caller-supplied attributes (onClick, role, aria-*) are spread onto the container. src/components/Card/Card.tsx:60

Card.intent.json lists Image in pairs_with, but no story composes Card with it: Card.stories.tsx never imports or renders it, and every story renders Card alone. This page does not assert the pairing. What is true is composition inside the component: Card.tsx is built from Image, as the registry’s Composes column records and the Code tab shows.

From Versioning (VERSIONING.md at b9ffb76):

0.3.0 adds six components on top of 0.2.1: Calendar, Card, Form, Modal, SideBar and Table. It contains twenty-three components, each exported from the package root with its props type: Avatar, Breadcrumbs, Button, ButtonGroup, Calendar, Card, Checkbox, Chip, Dropdown, File, Form, Header, Image, Link, Logo, Modal, ProgressBar, RadioCard, SearchBar, SideBar, Stepper, Table, Toggle. Textfield is exported from the package root as well, with TextfieldProps and TextfieldState, and is public like the others (see decisions.md, 2026-10-07, Textfield). It commits you to their props, prop values and defaults, their hz- class names, the tokens in tokens.css and the three entry points (., ./styles.css, ./tokens.css). Everything in 0.3.0 beyond 0.2.1 is an addition: nothing from 0.2.1 was changed, removed or renamed. A change that breaks any of these on 0.x bumps the version to 0.4.0.

Two things about this release are worth knowing:

  • Form, Modal and Table each passed release review with their literal sizes covered by a ruling in decisions.md (Card, SideBar and Calendar have their own), because no size tokens exist for them. Those literals are accepted until the designer adds matching tokens, so a later change to use tokens at the same rendered sizes would be a patch, not a breaking change.
  • Dark theme is not verified for Table, and its warning tag has low contrast. The Table docs page says so. Neither is a breaking-change risk, but a fix that changes a token’s value is a patch and is listed in the changelog.