FigureRow
Figures side by side inside a card (the mock's .grid.c12 > .s4 with .muted over .big, as in the brand page's Affiliate program and Gift stock blocks): a 12px muted label over a 20px heavy value, in equal columns (columns, default one per item). A description list.
import { FigureRow } from '@ergasti/bricks';Examples
Short lists in a card
MiniList holds MiniRows: a lead, a title over a muted line, a pill at the end; onOpen (or href) makes the whole row one target, and progress draws a bar under the lines.
Code
import { BrandAvatar, Card, IconSquare, MiniList, MiniRow, PrStatusPill, WalletHealthPill } from '@ergasti/bricks';
function Lists() {
return (
<div style={{ display: 'grid', gap: 16, gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))', alignItems: 'start' }}>
<Card>
<Card.Header title="My brands" />
<MiniList label="My brands">
<MiniRow lead={<BrandAvatar name="Glow Lab" color="#C7325C" />} title="Glow Lab" sub="86 creators" trailing={<WalletHealthPill health="ok" />} onOpen={() => {}} />
<MiniRow lead={<BrandAvatar name="Kemet Home" color="#3D5A10" />} title="Kemet Home" sub="57 creators" trailing={<WalletHealthPill health="negative" day={4} />} onOpen={() => {}} />
</MiniList>
</Card>
<Card>
<Card.Header title="Live challenges" />
<MiniList label="Live challenges" empty="None right now.">
<MiniRow title="Winter top 10" sub="Glow Lab · 15 days left" progress={50} onOpen={() => {}} />
<MiniRow title="Weekend sprint" sub="Kemet Home · 1 day left" progress={66} onOpen={() => {}} />
</MiniList>
</Card>
<Card>
<Card.Header title="Challenges" />
<MiniList label="Challenges">
<MiniRow lead={<IconSquare name="trophy" tone="rasp" />} title="Winter top 10" sub="Leaderboard · Public · 1–30 Nov" trailing={<PrStatusPill status="live" />} onOpen={() => {}} />
</MiniList>
</Card>
</div>
);
}Figures side by side
FigureRow puts a muted label over a big value, one equal column per item (or columns).
Code
import { Card, FigureRow } from '@ergasti/bricks';
function Figures() {
return (
<Card>
<Card.Header title="Affiliate program" sub="Since 1 Oct 2026" />
<FigureRow items={[{ label: 'Commission', value: '10% of sale' }, { label: 'Creators', value: '86' }, { label: 'Waiting to join', value: '1' }]} />
</Card>
);
}Figures in cells, on soft rows
cells puts figures before the trailing pill, each end-aligned in its own 96px cell, so the columns line up down the list (the brand page's Top creators: tier, sales, orders). variant="soft" draws grey rounded rows with a gap instead of ruled ones; keep the default ruled inside a busy card, use soft for a short list on its own.
Code
import { Avatar, Card, MiniList, MiniRow, Money, TierChip, count, useLanguage } from '@ergasti/bricks';
function CellsAndSoft() {
const language = useLanguage();
const top = [
{ name: 'Sara Ali', seed: 1, tier: 'elite', sales: '184300.00', orders: 214, handle: '@sara.glow' },
{ name: 'Nour Hassan', seed: 4, tier: 'established', sales: '96120.50', orders: 131, handle: '@nour.h' },
{ name: 'Omar Fathy', seed: 7, tier: 'rising', sales: '41800.00', orders: 58, handle: '@omarfathy' },
];
return (
<div style={{ display: 'grid', gap: 16, gridTemplateColumns: 'repeat(auto-fit, minmax(340px, 1fr))', alignItems: 'start' }}>
{(['ruled', 'soft'] as const).map((variant) => (
<Card key={variant}>
<Card.Header title={variant === 'soft' ? 'Top creators · soft' : 'Top creators'} />
<MiniList label="Top creators" variant={variant}>
{top.map((c) => (
<MiniRow key={c.name} lead={<Avatar name={c.name} seed={c.seed} />} title={c.name} sub={c.handle}
cells={[<TierChip key="t" tier={c.tier} />, <Money key="s" value={c.sales} />, language === 'ar' ? `${count(c.orders, language)} طلب` : `${count(c.orders, language)} orders`]} onOpen={() => {}} />
))}
</MiniList>
</Card>
))}
</div>
);
}Props
Prop
Type
Design guidance
How the BRICKS design system uses FigureRow. Written in docs/content/components/FigureRow.md; the props above are read from the code, which wins where the two disagree.
A row of figures side by side inside a card, each a small muted label over a big heavy value; use it for two to four headline numbers about one thing (a program, a stock).
It is the PR mock's .grid.c12 > .s4 pattern (.muted over .big, 20px), used on the PR Portal's Brand detail page in the "Affiliate program" card (Commission · Creators · Waiting to join) and inside BrandGiftStock (Units left · Delivered · Not delivered yet). It is a description list in equal columns; it has no card, header or actions of its own.
Anatomy
- List (
.kit-pr-figs, a<dl>): CSS grid,repeat(var(--figs), minmax(0, 1fr)), gap 16.--figsis set inline tocolumnsor the item count. - Item (
<div>): one per entry, keyed bykeyor index. - Label (
<dt>): 12px,--ink-3. - Value (
<dd>with a<bdi>): display face, 20px, 800, line-height 1.1, tabular numbers, start-aligned.
Variants
| Prop / value | Look | Use when |
|---|---|---|
columns omitted | One equal column per item | Almost always (three figures in the mock). |
columns={n} fewer than items | Items wrap into rows of n | Four figures in a narrow card (2 × 2). |
columns={n} more than items | Items keep narrower columns, empty space at the end | Aligning with a sibling FigureRow that has more items. |
Values can be text ("10% of sale"), formatted counts ("42 / 100") or nodes such as <Money>.
States
Static. No hover, focus, loading or empty state: with items={[]} it renders an empty <dl> (one column), so do not render it until you have the figures. Long values wrap inside their column; keep them short.
Types
| Field | Type | Required | Description |
|---|---|---|---|
key | string | number | no | A stable key; default the index. |
label | ReactNode | yes | The muted label. |
value | ReactNode | yes | The figure as shown, isolated in a <bdi> so a number keeps its order in Arabic. |
Usage
// PR Portal › Brands › Brand detail (Glow Lab) › "Affiliate program" card
<Card>
<Card.Header title="Affiliate program" sub="Since 1 Oct 2026" actions={<PrStatusPill status="active" />} />
<FigureRow items={[
{ label: 'Commission', value: '10% of sale' },
{ label: 'Creators', value: '86' },
{ label: 'Waiting to join', value: '1' },
]} />
<div style={{ display: 'flex', gap: 8 }}>
<Button size="sm" variant="ink"><PrIcon name="edit" />Edit program</Button>
<Button size="sm"><PrIcon name="pause" />Pause</Button>
</div>
</Card>// Gift stock figures (what BrandGiftStock renders inside)
<FigureRow items={[
{ key: 'left', label: 'Units left', value: `${count(42, lang)} / ${count(100, lang)}` },
{ key: 'delivered', label: 'Delivered', value: count(38, lang) },
{ key: 'notDelivered', label: 'Not delivered yet', value: count(20, lang) },
]} />// Four figures, two per row, with money
<FigureRow columns={2} items={[
{ label: 'Commission', value: '10% of sale' },
{ label: 'Creators', value: '86' },
{ label: 'Sales', value: <Money value="412300.00" /> },
{ label: 'Orders', value: '1,284' },
]} />Where it appears
- PR Portal › Brands › Brand detail › "Affiliate program" card (mock
P.brand, line "Commission · Creators · Waiting to join"). Gallery screenbrand; screen PR · Brand. - PR Portal › Brands › Brand detail › "Gift stock" card, through
BrandGiftStock(Units left · Delivered · Not delivered yet).
Guidelines
Do
- Keep to two to four figures; label each with a noun phrase ("Waiting to join").
- Pre-format values in the app's language (
count(),Money), so digits and grouping match. - Put it inside a
Cardunder its header, with actions after it.
Don't
- Don't use it for KPIs at the top of a page: use
KpiGridwithTile/KpiCard. - Don't use it for label/value pairs read in a list: use a
.kvlist (GiftShipmentTimeline,BrandGiftStockCard). - Don't put links or buttons inside values.
RTL and Arabic
- Columns run right to left; values stay start-aligned (right in RTL).
- Arabic labels from Brand detail: "العمولة", "صنّاع المحتوى", "مستنيين ينضموا"; values like "10% من البيع".
- Numbers keep order inside
<bdi>.
Tokens
--ink, --ink-3, --font-family-display, --figs (set inline).
Accessibility
- A
<dl>: each label is a<dt>, each value a<dd>, read as pairs. - Values sit in
<bdi>, so "10% of sale" or "42 / 100" keep their order in Arabic. - Size and weight carry the hierarchy; the label (
--ink-3on--card, 12px) is secondary text.
Found in the source
- No roles, ARIA attributes or key handling are set in this component's own source; it renders native elements and the components it composes.
Read from the component's source and tests. See Accessibility for the patterns the library follows.
Related
BrandGiftStock: Brand detail's Gift stock card built on it.KpiGrid/Tile/KpiCard: page-level KPIs.MiniList: lists of rows in the same sidebar cards.BrandGiftStockCard: a single figure as a.kvrow.
See also: Card · MiniRow · BrandAvatar · WalletHealthPill · IconSquare · Leaderboard · PrStatusPill · useLanguage · Avatar · TierChip · Money · BulkAction · ChangePreview
Source
src/pr/mini/FigureRow.tsx (line 18) on GitHub.