MiniList
A short list inside a card (the mock's run of .mini rows): MiniRows, ruled between, or (variant="soft") as soft grey rows 8px apart (the brand page's Top creators, .rows .rowi). With no rows it shows empty (default "Nothing here yet.") as a muted line.
import { MiniList } 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
Labels
Every word this component draws, in both languages. Override one per component and language with BricksProvider labels under the key prMiniList, or with the component's own prop where it has one. A {name} is a value the component fills in.
| Key | English | Arabic |
|---|---|---|
progress | {p}% done | خلص {p}% |
none | Nothing here yet. | لسه مفيش حاجة هنا. |
Design guidance
How the BRICKS design system uses MiniList. Written in docs/content/components/MiniList.md; the props above are read from the code, which wins where the two disagree.
A short list of rows inside a card (lead, bold title over a muted line, optional bar, figures and a pill); use it for the PR Portal's "My brands", "Live challenges" and "Top creators" side lists.
MiniList and MiniRow are the PR mock's run of .mini rows. They keep side cards compact: three to six rows, each one target that opens the brand or challenge. The soft variant draws grey rounded rows with figure cells, Brand detail's Top creators. FigureRow, documented on this card too, is the mock's figures-side-by-side block (muted label over a big value) used in the same cards.
Anatomy
MiniList
- List:
<ul class="kit-pr-minis" aria-label={label}>, a column of MiniRows;ruledrows are split by a 1px--linerule,softrows sit 8px apart. - Empty line: with no rows, a muted
<p>(empty, default "Nothing here yet.") instead of the list.
MiniRow
- Row:
<li>holding a<button>(withonOpen), an<a>(withhref) or a<div>; flex, 12px gap, 10px block padding (soft: 12px 16px, radius 16,--softfill). - Lead (optional): a BrandAvatar, Avatar or IconSquare.
- Lines: bold title (one line, ellipsis) over a 12px
--ink-3sub line. - Progress bar (optional): 8px track, raspberry fill to
progress%, with a visually hidden "{p}% done". - Cells (optional): end-aligned figures, each at least 96px wide, tabular digits.
- Trailing (optional): a pill.
FigureRow: a <dl> grid of equal columns; each item a 12px muted <dt> over a 20px / 800 display <dd> wrapped in <bdi>.
Variants
| Prop | Value | Look | When to use |
|---|---|---|---|
MiniList variant | ruled (default) | Rows split by rules, no fill | My brands, Live challenges, brand challenges |
soft | Grey rounded rows, 8px gap, hover darkens | Top creators with figure cells | |
MiniRow progress | 0-100 | Raspberry bar under the lines | Live challenges ("Winter top 10 · 15 days left") |
MiniRow cells | array of nodes | End-aligned figure columns | Tier, sales, orders per creator |
FigureRow columns | number | Fixed column count (default: one per item) | Affiliate program card, Gift stock figures |
States
| State | Trigger |
|---|---|
| Static row | no onOpen, no href |
| Clickable | onOpen (button) or href (link via safeHref); title turns raspberry on hover, pointer cursor |
| Focus-visible | --focus-ring around the row |
| Empty | no children: the empty line |
| Long title | one line, ellipsis |
| Touch (≤1024px) | clickable rows at least 44px tall |
| Narrow (≤560px) | cells drop their 96px minimum |
Types
MiniRow
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
title | ReactNode | yes | Bold line ("Glow Lab"). | |
lead | ReactNode | none | no | Square, avatar or icon at the start. |
sub | ReactNode | none | no | Muted line ("86 creators"). |
trailing | ReactNode | none | no | A pill at the end. |
cells | ReadonlyArray<ReactNode> | none | no | Figures before trailing. |
progress | number | none | no | 0-100, clamped and rounded. |
progressLabel | string | "{p}% done" | no | What the bar means. |
onOpen | () => void | none | no | Makes the row one button. |
href | string | none | no | Or a link (ignored with onOpen). |
language | Lang | provider's | no | Words. |
labels | Partial<PrMiniListCopy> | none | no | Words. |
FigureRow
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
items | ReadonlyArray<FigureItem> ({ label, value, key? }) | yes | The figures. | |
columns | number | number of items | no | Column count. |
Usage
import { MiniList, MiniRow, WalletHealthPill, BrandAvatar } from '@ergasti/bricks';
<Card 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={() => openBrand('glow-lab')} />
<MiniRow lead={<BrandAvatar name="Mira Beauty" color="#5B3BB0" />} title="Mira Beauty" sub="23 creators" trailing={<WalletHealthPill health="low" />} onOpen={() => openBrand('mira')} />
<MiniRow lead={<BrandAvatar name="Kemet Home" color="#3D5A10" />} title="Kemet Home" sub="57 creators" trailing={<WalletHealthPill health="negative" day={4} />} onOpen={() => openBrand('kemet')} />
</MiniList>
</Card>// Home › Live challenges: no lead, a progress bar, an empty line
<MiniList label="Live challenges" empty="None right now.">
{live.map((c) => (
<MiniRow key={c.id} title={c.name} sub={`${c.brand} · ${c.daysLeft} days left`} progress={c.progress} onOpen={() => openChallenge(c.id)} />
))}
</MiniList>// Brand detail › Top creators (soft rows with figures) and the program figures
<MiniList label="Top creators" variant="soft">
<MiniRow lead={<Avatar name="Nour Hassan" seed={4} />} title="Nour Hassan" cells={[<TierChip key="t" tier="elite" />, 'EGP 212,000', '702']} />
</MiniList>
<FigureRow items={[{ label: 'Commission', value: '10% of sale' }, { label: 'Creators', value: '86' }, { label: 'Waiting to join', value: '1' }]} />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. (docs example Lists)
import { Avatar, BrandAvatar, Card, FigureRow, IconSquare, MiniList, MiniRow, Money, PrStatusPill, TierChip, WalletHealthPill, count, useLanguage } from '@ergasti/bricks';
export 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>
);
}Where it appears
- PR Portal › Home › "My brands" side card (brand square, creators, wallet pill).
- PR Portal › Home › "Live challenges" side card (progress bars).
- PR Portal › Brand detail › Challenges card (IconSquare lead, PrStatusPill), Top creators (
soft+cells), Affiliate program figures (FigureRow). - Dashboard screens: PrHome, PrBrandDetail.
Guidelines
Do
- Keep it to about six rows and link "See all" from the card header for more.
- Give the whole row one target (
onOpenorhref), never a button inside the row. - Use
cellsonly withvariant="soft", where the columns line up.
Don't
- Don't use it for long or sortable lists: use
DataTable. - Don't put two pills in
trailing. - Don't hide the meaning in the bar: say it in
subtoo ("15 days left").
RTL and Arabic
Rows use text-align: start and logical padding, so leads move to the right and cells to the left in Arabic. The bar fills from the inline start. Arabic copy: "خلص {p}%", "لسه مفيش حاجة هنا."; figures in <bdi> keep "EGP 212,000" intact.
Tokens
--line, --ink, --ink-3, --rasp, --soft, --focus-ring, --radius-xs; FigureRow reads --font-family-display. The touch-tier row height is a fixed 44px in pr.css, not the --min-touch-target token.
Accessibility
- A real
<ul>named bylabel; each row is an<li>. - Clickable rows are a
<button type="button">or an<a>(href throughsafeHref), so Enter/Space work and focus shows--focus-ring. - The progress bar's fill is
aria-hidden; a visually hidden span reads "{p}% done" (orprogressLabel). - FigureRow is a description list (
dt/dd), values isolated with<bdi>.
Found in the source
- ARIA attributes set:
aria-label,aria-hidden. - Its tests cover: “onOpen makes the whole row one button, by mouse and keyboard”; “cells sit before the trailing pill; soft variant”; “label over value pairs in a description list, one column per item by default”.
Read from the component's source and tests. See Accessibility for the patterns the library follows.
Related
TaskRow: Home's "To review" rows with a chevron and tag, in a full-width card.RankList/Leaderboard: ranked creators.KeyValue/SummarySection: label-value lines rather than figures.DataTable: anything longer, sortable or paged.
See also: useLanguage · Card · MiniRow · BrandAvatar · WalletHealthPill · IconSquare · PrStatusPill · FigureRow · Avatar · TierChip · Money · BulkAction · ChangePreview
Source
src/pr/mini/MiniList.tsx (line 27) on GitHub.