Routing condition card
The condition node on the Routing flow canvas (Figma Card_workflow). It REFLECTS the condition configuration of a route branch — the conditions are configured elsewhere — and lets the merchant edit them from the node. The node is a muted frame with a white content group inset to the left (rounded-left corners); the muted strip on the right is the connector zone, and a round connector handle sticks out the right edge. Two shapes: collapsed (the catch-all node, a centered title + id) and expanded (an ID / Name / Description block over one or more conditions).
Live preview
import {
RoutingConditionCard,
RoutingConditionInfo,
RoutingCondition,
} from "@/components/patterns/routing-condition-card";
<RoutingConditionCard onMute={mute} onMenu={openMenu} className="w-[376px]">
<RoutingConditionInfo
id="840611J90"
name="Tarjetas"
description="Todas las tarjetas de credito visa"
onCopyId={copyId}
/>
<RoutingCondition
title="Card country"
operator="One of"
values={["Argentina", "Chile", "Colombia", "Ecuador"]}
/>
</RoutingConditionCard>Anatomy
A muted node frame (rounded-xl, shadow-xs) wrapping a white content group with left-rounded corners; the muted strip on the right is the connector zone. Collapsed, the white group centers a title + id (left-padded so it sits balanced against the actions). Expanded, an ID / Name / Description block sits over one or more condition blocks. The node actions (overflow menu + mute) live in their own column, and the connector handle sticks out the right edge.
- 1Connector handle
The round action handle (RoutingConnector) sticking out the right edge — the anchor an edge is drawn from and the Add step affordance. Three states: active / disabled / block (documented on RoutingProviderCard).
- 2Node actions
Mute bell (and, expanded, the overflow menu) in an icon column. Each uses the kit's icon-button hover — the same box the table row kebab reveals.
- 3Heading (collapsed)
The catch-all node: a centered title + id with a copy affordance, left-padded to balance against the actions.
- 4Info block
ID / Name / Description rows — values right-aligned; long values (Description) truncate.
- 5Condition
A reflected condition: an icon in a tinted square, a bold title, an operator chip (secondary) and the value chips (outline).
States
The 'All other payments' node — a centered title + id. The default branch with no configured conditions.
A named condition — an ID / Name / Description block over its conditions. Each condition reflects its operator + values; edit from the overflow menu.
Import
Copy this import line at the top of the file where you compose this molecule.
Compose from the parts: a RoutingConditionCard shell holding a RoutingConditionCardHeading (collapsed) OR a RoutingConditionInfo + one or more RoutingCondition blocks (expanded).
import { RoutingConditionCard, RoutingConditionCardHeading, RoutingConditionInfo, RoutingCondition } from "@/components/patterns/routing-condition-card";Props
The shell owns the connector handle + the node actions; the heading, info block and each condition carry their own props.
RoutingConditionCard
| Prop | Type | Default | Description |
|---|---|---|---|
| onMute | () => void | — | Mute bell in the node-actions column. |
| onMenu | () => void | — | Overflow menu (kebab) in the node-actions column. |
| connector | "active" | "disabled" | "block" | "none" | "active" | The forward connector handle state (see RoutingProviderCard for the full 3-state doc). "none" hides it. |
| onConnect | () => void | — | Click handler for the connector handle ("Add step"). |
| children | ReactNode | — | A Heading (collapsed) or an Info block + Condition blocks (expanded). |
| className | string | — | Set the node width here (e.g. w-[376px]); collapsed hugs by default. |
RoutingConditionCardHeading
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | — | The catch-all title (text-lg semibold), centered. |
| id | string | — | The node id, shown as 'ID: {id}'. |
| onCopyId | () => void | — | Renders a copy affordance after the id. |
RoutingConditionInfo
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | — | ID row value (with an optional copy affordance). |
| name | string | — | Name row value. |
| description | string | — | Description row value (truncates when long). |
| onCopyId | () => void | — | Copy affordance on the ID row. |
RoutingCondition
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | — | The condition title (text-base bold). |
| operator | string | — | The operator chip, e.g. 'One of', 'Equal' (secondary Badge). |
| values | string[] | — | The value chips (outline Badges, wrap). |
| icon | PhosphorIcon | TreeStructure | Shown in a bg-blue-600/15 tinted square. |
When to use
- To represent a route branch's condition set on the Routing canvas.
- To reflect the configured conditions (operator + values) and let the merchant edit them.
- As the catch-all 'All other payments' entry, or a named condition.
When not to use
- To CONFIGURE the conditions from scratch — that is a separate condition editor; this card reflects + edits the result.
- For a provider step — that is the routing provider card.
- Outside the Routing canvas.
Usage
- Keep the catch-all title on one line; left-pad the heading so it stays balanced against the actions column.
- Right-align the info values and truncate long ones (Description).
- Show each condition's operator chip (secondary) above its value chips (outline).
- Don't let the node actions overlap the content — give them their own column in the node.
- Don't hardcode the condition-icon tint — use an alpha (bg-blue-600/15) so it adapts to dark.
- Don't give the connector handle a kebab-style hover — it is the action handle with its own three states, not a menu icon.
Related
Cross-links to the atoms this molecule composes and sibling patterns.
- Routing provider cardThe provider node this condition routes into; owns the shared connector handle.
- Routing add menuThe Add step menu opened from a connector.
- BadgeThe operator + value chips.