Skip to Content
BBRICKSv0.7.4
PR PortalBrands

BrandWalletCard

The PR brand page's Wallet card: health pill; Available, Held for orders, Balance; the share left of the last top-up with its bar; the TRNDR fee marked default or "this brand"; Adjust wallet and Change fee. A labelled section.

import { BrandWalletCard } from '@ergasti/bricks';

Examples

Brand page header

Name, program status, wallet health (with the day when it is below zero), meta lines, back and actions. Under it, the "view as brand" banner.

Code
import { Button, BrandDetailHeader, ViewAsBanner } from '@ergasti/bricks';

function Header() {
  return (
    <div style={{ display: 'grid', gap: 12 }}>
      <BrandDetailHeader name="Kemet Home" color="#3D5A10" status="active" health="negative" healthDay={4} meta={['Since 5 Oct 2026', '12% of sale']} onBack={() => {}} actions={<><Button>View as brand</Button><Button variant="ink">New challenge</Button></>} />
      <ViewAsBanner brandName="Kemet Home" onExit={() => {}} />
    </div>
  );
}

Brand wallet

Available, held and balance, the wallet's health, and the TRNDR fee (default or the brand's own) with adjust and change actions.

Code
import { BrandWalletCard } from '@ergasti/bricks';

function Wallet() {
  return (
    <div style={{ display: 'grid', gap: 16, gridTemplateColumns: 'repeat(auto-fit, minmax(320px, 1fr))' }}>
      <BrandWalletCard available="-8400.00" held="1200.00" balance="-7200.00" leftPercent={0} health="negative" healthDay={4} feePercent="5" feeIsDefault onAdjust={() => {}} onChangeFee={() => {}} />
      <BrandWalletCard available="43390.00" held="18450.00" balance="61840.00" leftPercent={62} health="ok" feePercent="4" feeIsDefault={false} onAdjust={() => {}} onChangeFee={() => {}} />
    </div>
  );
}

Back to your own list

backLabel names the crumb when the list it goes back to is not "Brands" (here a PR's own brands); a paused program with a low wallet.

Code
import { BrandDetailHeader } from '@ergasti/bricks';

function BackLabel() {
  return <BrandDetailHeader name="Mira Beauty" color="#5B3BB0" status="paused" health="low" meta={['Since 2 Sep 2026', '8% of sale', 'PR owner: Mona']} onBack={() => {}} backLabel="My brands" />;
}

How brands top up

The note under the buttons says how a brand can add money: the default topUpMethods="card-or-bank" reads "Brands top up by card (Paymob) or bank transfer."; "card" reads "Brands top up by card (Paymob)." for a market where bank transfers are off (the PR mock's brand page). Default on the left.

Code
import { BrandWalletCard } from '@ergasti/bricks';

function TopUpMethods() {
  return (
    <div style={{ display: 'grid', gap: 16, gridTemplateColumns: 'repeat(auto-fit, minmax(320px, 1fr))' }}>
      <BrandWalletCard available="43390.00" held="18450.00" balance="61840.00" leftPercent={62} health="ok" feePercent="5" feeIsDefault onAdjust={() => {}} onChangeFee={() => {}} />
      <BrandWalletCard available="43390.00" held="18450.00" balance="61840.00" leftPercent={62} health="ok" feePercent="5" feeIsDefault onAdjust={() => {}} onChangeFee={() => {}} topUpMethods="card" />
    </div>
  );
}

Wallet in Arabic, card top-ups only

The figures read through Money, the note "البراندات بتشحن بالكارت (Paymob)."

Pinned to Arabic
Code
import { BrandWalletCard } from '@ergasti/bricks';

function TopUpCardArabic() {
  return <BrandWalletCard available="12500.00" held="3200.00" balance="15700.00" leftPercent={18} health="low" feePercent="4" feeIsDefault={false} onAdjust={() => {}} onChangeFee={() => {}} topUpMethods="card" />;
}

Props

Prop

Type

Labels

Every word this component draws, in both languages. Override one per component and language with BricksProvider labels under the key prBrandDetail, or with the component's own prop where it has one. A {name} is a value the component fills in.

prBrandDetail
KeyEnglishArabic
crumbsBreadcrumbمسار الصفحة
brandsBrandsالبراندات
ownerPR ownerمسؤول الـ PR
you(you)(إنت)
sinceSince {d}من {d}
walletWalletالمحفظة
availableAvailableالمتاح
heldHeld for ordersمحجوز للطلبات
balanceBalanceالرصيد
leftLeft of last top-upالباقي من آخر شحنة
feeTRNDR feeرسوم TRNDR
feeDefault(default)(الافتراضي)
feeBrand(this brand)(للبراند ده)
adjustAdjust walletعدّل المحفظة
changeFeeChange feeغيّر الرسوم
topupsBrands top up by card (Paymob) or bank transfer.البراندات بتشحن بالكارت (Paymob) أو بتحويل بنكي.
topupsCardBrands top up by card (Paymob).البراندات بتشحن بالكارت (Paymob).
leftPct{p}% left of the last top-upفاضل {p}% من آخر شحنة
viewing[object Object][object Object]
exitExit viewاخرج من العرض

Design guidance

How the BRICKS design system uses BrandWalletCard. Written in docs/content/components/BrandWalletCard.md; the props above are read from the code, which wins where the two disagree.

The PR brand page's Wallet card: a health pill, Available / Held for orders / Balance, the share left of the last top-up with its bar, the TRNDR fee (default or this brand), and Adjust wallet / Change fee; use it on a brand's page in the PR Portal.

It is the PR mock's brand-page wallet card. The figures are server 2-dp strings; a negative Available turns red. The bar turns raspberry under 20% left. It is a labelled section.

Anatomy

  1. Card head: "Wallet" (h2) and WalletHealthPill.
  2. Figures (<dl class="kit-pr-kv">, 13.5px rows): Available, Held for orders, Balance (each label a MoneyNote term), Left of last top-up (%).
  3. Bar (.kit-pr-track--lg, 8px, decorative): lime when ≥ 20%, raspberry under; min 2% drawn.
  4. Rule, then TRNDR fee "5% (default)" / "4% (this brand)".
  5. Actions: small "Adjust wallet" and ghost "Change fee".
  6. Note (muted): "Brands top up by card (Paymob) or bank transfer." / "Brands top up by card (Paymob)."

Variants

PropValueEffect
health'ok' | 'low' | 'negative' | 'paused'Pill.
feeIsDefaulttrue / false"(default)" / "(this brand)".
topUpMethods'card-or-bank' (default) / 'card'The note (the PR mock: card only).
no onAdjust / onChangeFee—Read-only, no actions (story ReadOnly).

States

StateHow
Healthy72% left, lime bar.
Low12% left, raspberry bar, Low funds.
Below zeroAvailable "-8,400.00" in red, "Below zero · day 4/7".
Read-onlyno handlers.

Usage

<BrandWalletCard
  available="43390.00"
  held="18450.00"
  balance="61840.00"
  leftPercent={17}
  health="ok"
  feePercent="5"
  feeIsDefault
  topUpMethods="card"
  onAdjust={() => setAdjustOpen(true)}
  onChangeFee={() => setFeeOpen(true)}
/>
// Below zero, read-only for a PR member without wallet rights
<BrandWalletCard available="-8400.00" held="1200.00" balance="-7200.00" leftPercent={0}
  health="negative" healthDay={4} feePercent="5" feeIsDefault />

Where it appears

Guidelines

Do

  • Pass the server's health verdict and grace day.
  • Hide the actions for roles that cannot change wallets.
  • Wrap the page in MoneyNotesProvider so the "?" terms explain each figure.

Don't

  • Don't compute Balance in the client; pass the server figure.
  • Don't use it on the brand dashboard; brands see WalletHealthCard and the wallet hero.

RTL and Arabic

  • Labels right, values left; percentages LTR. "المتاح", "محجوز للطلبات", "الرصيد", "عدّل المحفظة".

Tokens

--track, --chart-lime, --rasp, --bad, --ink-3; card tokens.

Accessibility

  • <section aria-label="Wallet">; figures are a <dl>; the bar is aria-hidden (the % is in the list).
  • Negative is written with a minus, not only red.

Found in the source

  • Roles in the markup: status.
  • ARIA attributes set: aria-label, aria-hidden, aria-current.

Read from the component's source and tests. See Accessibility for the patterns the library follows.

See also: Button · Money · MoneyNote · BrandAvatar · PrIcon · PrStatusPill · useLanguage · ViewAsBanner · AdjustWalletDialog · BrandCell

Source

src/pr/BrandDetail.tsx (line 118) on GitHub.

On this page