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)."
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.
| Key | English | Arabic |
|---|---|---|
crumbs | Breadcrumb | مسار الصفحة |
brands | Brands | البراندات |
owner | PR owner | مسؤول الـ PR |
you | (you) | (إنت) |
since | Since {d} | من {d} |
wallet | Wallet | المحفظة |
available | Available | المتاح |
held | Held for orders | محجوز للطلبات |
balance | Balance | الرصيد |
left | Left of last top-up | الباقي من آخر شحنة |
fee | TRNDR fee | رسوم TRNDR |
feeDefault | (default) | (الافتراضي) |
feeBrand | (this brand) | (للبراند ده) |
adjust | Adjust wallet | عدّل المحفظة |
changeFee | Change fee | غيّر الرسوم |
topups | Brands top up by card (Paymob) or bank transfer. | البراندات بتشحن بالكارت (Paymob) أو بتحويل بنكي. |
topupsCard | Brands top up by card (Paymob). | البراندات بتشحن بالكارت (Paymob). |
leftPct | {p}% left of the last top-up | فاضل {p}% من آخر شحنة |
viewing | [object Object] | [object Object] |
exit | Exit 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
- Card head: "Wallet" (
h2) andWalletHealthPill. - Figures (
<dl class="kit-pr-kv">, 13.5px rows): Available, Held for orders, Balance (each label aMoneyNoteterm), Left of last top-up (%). - Bar (
.kit-pr-track--lg, 8px, decorative): lime when ≥ 20%, raspberry under; min 2% drawn. - Rule, then TRNDR fee "5% (default)" / "4% (this brand)".
- Actions: small "Adjust wallet" and ghost "Change fee".
- Note (muted): "Brands top up by card (Paymob) or bank transfer." / "Brands top up by card (Paymob)."
Variants
| Prop | Value | Effect |
|---|---|---|
health | 'ok' | 'low' | 'negative' | 'paused' | Pill. |
feeIsDefault | true / 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
| State | How |
|---|---|
| Healthy | 72% left, lime bar. |
| Low | 12% left, raspberry bar, Low funds. |
| Below zero | Available "-8,400.00" in red, "Below zero · day 4/7". |
| Read-only | no 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
- PR Portal › Brands › Brand detail › Wallet card. Screens: PR · Brand, PR · Home.
Guidelines
Do
- Pass the server's health verdict and grace day.
- Hide the actions for roles that cannot change wallets.
- Wrap the page in
MoneyNotesProviderso 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
WalletHealthCardand 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 isaria-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.
Related
WalletHealthPill: the pill.WalletHealthCard: the brand's own view.BrandDetailHeader,BrandGiftStock.
See also: Button · Money · MoneyNote · BrandAvatar · PrIcon · PrStatusPill · useLanguage · ViewAsBanner · AdjustWalletDialog · BrandCell
Source
src/pr/BrandDetail.tsx (line 118) on GitHub.