Skip to Content
BBRICKSv0.7.4
PR PortalForms and dialogs

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.

prMiniList
KeyEnglishArabic
progress{p}% doneخلص {p}%
noneNothing 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

  1. List: <ul class="kit-pr-minis" aria-label={label}>, a column of MiniRows; ruled rows are split by a 1px --line rule, soft rows sit 8px apart.
  2. Empty line: with no rows, a muted <p> (empty, default "Nothing here yet.") instead of the list.

MiniRow

  1. Row: <li> holding a <button> (with onOpen), an <a> (with href) or a <div>; flex, 12px gap, 10px block padding (soft: 12px 16px, radius 16, --soft fill).
  2. Lead (optional): a BrandAvatar, Avatar or IconSquare.
  3. Lines: bold title (one line, ellipsis) over a 12px --ink-3 sub line.
  4. Progress bar (optional): 8px track, raspberry fill to progress%, with a visually hidden "{p}% done".
  5. Cells (optional): end-aligned figures, each at least 96px wide, tabular digits.
  6. 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

PropValueLookWhen to use
MiniList variantruled (default)Rows split by rules, no fillMy brands, Live challenges, brand challenges
softGrey rounded rows, 8px gap, hover darkensTop creators with figure cells
MiniRow progress0-100Raspberry bar under the linesLive challenges ("Winter top 10 · 15 days left")
MiniRow cellsarray of nodesEnd-aligned figure columnsTier, sales, orders per creator
FigureRow columnsnumberFixed column count (default: one per item)Affiliate program card, Gift stock figures

States

StateTrigger
Static rowno onOpen, no href
ClickableonOpen (button) or href (link via safeHref); title turns raspberry on hover, pointer cursor
Focus-visible--focus-ring around the row
Emptyno children: the empty line
Long titleone line, ellipsis
Touch (≤1024px)clickable rows at least 44px tall
Narrow (≤560px)cells drop their 96px minimum

Types

MiniRow

PropTypeDefaultRequiredDescription
titleReactNodeyesBold line ("Glow Lab").
leadReactNodenonenoSquare, avatar or icon at the start.
subReactNodenonenoMuted line ("86 creators").
trailingReactNodenonenoA pill at the end.
cellsReadonlyArray<ReactNode>nonenoFigures before trailing.
progressnumbernoneno0-100, clamped and rounded.
progressLabelstring"{p}% done"noWhat the bar means.
onOpen() => voidnonenoMakes the row one button.
hrefstringnonenoOr a link (ignored with onOpen).
languageLangprovider'snoWords.
labelsPartial<PrMiniListCopy>nonenoWords.

FigureRow

PropTypeDefaultRequiredDescription
itemsReadonlyArray<FigureItem> ({ label, value, key? })yesThe figures.
columnsnumbernumber of itemsnoColumn 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 (onOpen or href), never a button inside the row.
  • Use cells only with variant="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 sub too ("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 by label; each row is an <li>.
  • Clickable rows are a <button type="button"> or an <a> (href through safeHref), so Enter/Space work and focus shows --focus-ring.
  • The progress bar's fill is aria-hidden; a visually hidden span reads "{p}% done" (or progressLabel).
  • 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.

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.

On this page