Routing version card
The route-version cards shown inside the Routing conditions sheet that opens from a RoutingCard's View button (Figma Card / Content). Each row is a published, archived or draft version of a route: an icon + name + version chip + a 'Last published at…' line, with a status badge, a favorite star and an overflow menu. Rows compose into a current version with its archived versions nested underneath, and a flat list of older versions.
Live preview
import {
RoutingVersionCard,
RoutingVersionRow,
} from "@/components/patterns/routing-version-card";
<RoutingVersionCard>
<RoutingVersionRow
name="Amex Argentina"
version="Version 5"
subtitle="Last published at Dec 14, 2026, 1:15 pm GMT-3"
status="published"
favorite={isFavorite}
onFavorite={toggleFavorite}
onMenu={openMenu}
/>
</RoutingVersionCard>Anatomy
A white bordered card (rounded-xl) around a row: a muted icon square, the route name + a version chip, an optional flag chip, and a muted last-published line; on the right a status badge, a favorite star and an overflow menu. Cards compose three ways: a plain card, a tree card (indented, with an L connector to the current version above) and a grouped list (collapsed borders, one rounded block).
- 1Icon square
A 48px muted square holding the route icon (TreeStructure by default).
- 2Name + version
The route name (text-base semibold) and a version chip (secondary Badge, e.g. 'Version 5').
- 3Flag chip
Optional Paused (yellow) or Error (rose) StatusBadge next to the version, on top of the main status.
- 4Last-published line
The muted 'Last published at…' (or 'Last edited at…' for drafts) subtitle.
- 5Status
The right-side StatusBadge: Published (green) or Archived (muted). Omitted on draft rows.
- 6Favorite star
Toggles favorite; the filled star is yellow-600.
- 7Overflow menu
Per-version actions (kebab).
- 8Card / Tree / List
The plain card, the indented tree card with its L connector, and the grouped collapsed-border list.
States
The live version — a green Published StatusBadge. Star it to mark the working favorite.
A superseded version — a muted Archived badge. Shown as a tree card indented under its current version, with the L connector.
Optional Paused (yellow) or Error (rose) chip next to the version, on top of the main status.
A draft version under the Drafts tab — omit status so no Published/Archived badge shows; the last line reads 'Last edited at…'.
Import
Copy this import line at the top of the file where you compose this molecule.
Compose a RoutingVersionCard (or RoutingVersionList) around one or more RoutingVersionRow items.
import { RoutingVersionCard, RoutingVersionRow, RoutingVersionList } from "@/components/patterns/routing-version-card";Nest an archived version under its current one with a tree card, and group a run of older versions in a RoutingVersionList (one rounded block, collapsed borders).
{/* Current version, then the archived version nested under it */}
<div className="flex flex-col gap-2">
<RoutingVersionCard>
<RoutingVersionRow name="Amex Argentina" version="Version 5" status="published" ... />
</RoutingVersionCard>
<RoutingVersionCard tree>
<RoutingVersionRow name="Amex Argentina" version="Version 6" status="archived" ... />
</RoutingVersionCard>
</div>
{/* A flat archived list — one rounded block, collapsed borders */}
<RoutingVersionList>
<RoutingVersionRow name="Visa Colombia" version="Version 4" status="archived" ... />
<RoutingVersionRow name="Visa Argentina" version="Version 3" status="archived" ... />
</RoutingVersionList>Props
The row carries the content + actions; the card and list are the containers.
RoutingVersionRow
| Prop | Type | Default | Description |
|---|---|---|---|
| name | string | — | The route name (text-base semibold). |
| version | string | — | The version chip text, e.g. 'Version 1' (secondary Badge). |
| subtitle | string | — | The muted line under the name, e.g. 'Last published at ...'. |
| status | "published" | "archived" | — | The right-side StatusBadge. Omit for a draft row (no badge). |
| paused | boolean | — | Optional Paused flag chip next to the version. |
| error | boolean | — | Optional Error flag chip next to the version. |
| favorite | boolean | — | Star fill state (filled star is yellow-600). |
| onFavorite | () => void | — | Toggle the favorite star. |
| onMenu | () => void | — | Open the per-version overflow menu. |
| icon | PhosphorIcon | TreeStructure | Leading icon in the muted square. |
RoutingVersionCard
| Prop | Type | Default | Description |
|---|---|---|---|
| tree | boolean | — | Indent the card and draw the L connector back to the current version above. |
| children | ReactNode | — | A single RoutingVersionRow. |
| className | string | — | Extra classes on the card surface. |
RoutingVersionList
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | RoutingVersionRow items. Each renders in a padded cell separated by a divider. |
| className | string | — | Extra classes on the grouped block. |
When to use
- Inside the Routing conditions sheet (opened from a RoutingCard View button), listing a route's versions.
- To show the current published version with its archived versions nested underneath.
- Under the Drafts tab, to list draft versions of a route.
When not to use
- For the routing screen provider tile — that is the routing card.
- For a condition node on the canvas — that is the routing condition card.
- For a generic list row outside the versions sheet.
Usage
- Nest archived versions under their current version with a tree card + the L connector.
- Group a run of older versions in a RoutingVersionList so they read as one block.
- Reuse the kit StatusBadge for Published / Archived / Paused / Error — do not hand-roll status chips.
- Don't show a Published/Archived badge on a draft row — omit status under the Drafts tab.
- Don't color the filled star anything but yellow-600.
- Don't wrap each version in its own separate card when they belong to one group — use the list.
Related
Cross-links to the atoms this molecule composes and sibling patterns.
- Routing cardThe provider tile whose View button opens the versions sheet.
- BadgeThe version chip (secondary) and the StatusBadge states.
- SheetThe full-screen surface the cards live in.