MiniRow
One row of a MiniList (the mock's .mini): a lead, a bold title over a muted line (and an optional progress bar), and a pill at the end. With onOpen or href the whole row is one target and its title turns raspberry on hover.
import { MiniRow } 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. | لسه مفيش حاجة هنا. |
Accessibility
- 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
useLanguage · Card · MiniList · BrandAvatar · WalletHealthPill · IconSquare · Leaderboard · PrStatusPill · FigureRow · Avatar · TierChip · Money · BulkAction · ChangePreview
Source
src/pr/mini/MiniList.tsx (line 74) on GitHub.