PayoutBatchDetail
The payout drawer's body: a lime head (date, creators, total), the transfer's method / reference / count / status, its proof ("View proof", "Download receipt"), and who was paid how much (each row opens the creator), then "and N more · Export CSV". Method, reference and paid-to are optional: what the server does not send yet is left out.
import { PayoutBatchDetail } from '@ergasti/bricks';Examples
One payout batch
The body of the "payout" drawer: date, amount, creators, method and reference, the first creators paid with their amounts, a proof button and a CSV export. The status words come from the TRNDR preset, so this example is pinned to it.
Code
import { PayoutBatchDetail } from '@ergasti/bricks';
import { blocksData } from './sample-data';
function Batch() {
return (
<div style={{ maxWidth: 400 }}>
<PayoutBatchDetail {...blocksData.PAYOUT} method="Bank transfer" onOpenProof={() => {}} onOpenCreator={() => {}} onExport={() => {}} />
</div>
);
}Every prop, written out
The batch's date, amount (2-dp string), creators paid, method, bank reference and status (any status key; pending here), and paidTo: the first creators with their amounts ("and N more" counts the rest).
Code
import { PayoutBatchDetail } from '@ergasti/bricks';
import { blocksData } from './sample-data';
function Pending() {
const people = blocksData.MINE.slice(0, 3);
return (
<div style={{ maxWidth: 400 }}>
<PayoutBatchDetail
date="25 Nov 2026" amount="48250.00" creators={41} method="InstaPay" reference="TRX-2026-11-25-0041" status="pending"
paidTo={people.map((person, i) => ({ person, amount: ['3200.00', '2875.50', '1940.00'][i] }))}
onOpenCreator={() => {}} onExport={() => {}}
/>
</div>
);
}Handles under the names
As the mock's payout drawer, each creator paid shows the
Code
import { PayoutBatchDetail } from '@ergasti/bricks';
function WithHandles() {
const paidTo = [
{ person: { id: 9, name: 'Tarek Fathy', handle: 'tarek.fathy' }, amount: '5775.00' },
{ person: { id: 2, name: 'Salma Hosny', handle: 'salma.hosny' }, amount: '3690.00' },
{ person: { id: 85, name: 'Hassan Selim', handle: 'hassan.selim' }, amount: '3128.00' },
];
return (
<div style={{ maxWidth: 400 }}>
<PayoutBatchDetail date="11 Nov 2026" amount="96420.00" creators={38} method="Bank transfer" reference="88531" paidTo={paidTo} onOpenCreator={() => {}} onExport={() => {}} />
</div>
);
}Before the API sends everything
method, reference and paidTo are optional: what is missing is left out (no row, no "Paid to"), and receiptHref adds "Download receipt", named by the date when there is no reference.
Code
import { PayoutBatchDetail } from '@ergasti/bricks';
import { blocksData } from './sample-data';
function Minimal() {
return (
<div style={{ maxWidth: 400 }}>
<PayoutBatchDetail date={blocksData.PAYOUT.date} amount={blocksData.PAYOUT.amount} creators={blocksData.PAYOUT.creators} receiptHref="#receipt" />
</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 payoutBatchDetail, or with the component's own prop where it has one. A {name} is a value the component fills in.
| Key | English | Arabic |
|---|---|---|
title | Payout · {d} | دفعة · {d} |
creators | 2 creators | ليس رقمًا صانع محتوى |
method | Method | الطريقة |
reference | Reference | المرجع |
creatorsKey | Creators | صنّاع المحتوى |
status | Status | الحالة |
paidTo | Paid to | اتدفع لمين |
more | and 2 more | وليس رقمًا كمان |
exportCsv | Export CSV | نزّل CSV |
exportHint | for the full list | للقايمة كاملة |
empty | No creators in this payout yet. | لسه مفيش صنّاع محتوى في الدفعة دي. |
Design guidance
How the BRICKS design system uses PayoutBatchDetail. Written in docs/content/components/PayoutBatchDetail.md; the props above are read from the code, which wins where the two disagree.
The payout drawer's body: a lime head (date, creators, total), the transfer's method, reference, count and status, its proof ("View proof", "Download receipt"), and who was paid how much, then "and N more · Export CSV"; open it from a past payout row.
It is the mock's openPayout() drawer on Brand › Payments › Payouts. Method, reference and paid-to are optional: what the server does not send yet is left out (before paid-to exists, Export CSV is offered on its own). The total carries the payout_batch_total "?"; each line is 2-dp money.
Anatomy
- Head:
DrawerHead tone="lime": "Payout · 11 Nov 2026"; sub "112 creators · EGP 96,420.00" (total with its "?"). - Rows:
KeyValue: Method, Reference (LTR), Creators, Status (StatusPill). - Proof row:
ProofButton"View proof" (onOpenProof) and "Download receipt" (receiptHref), named by the reference or date. - Paid to:
RowItemsheading "Paid to", person lead + amount (paid"?"), rows open the creator. - Footer note: "and 109 more · Export CSV for the full list" (or "Export CSV for the full list" alone without paid-to).
Variants
| Setup | When |
|---|---|
| Full | method, reference, proof, paid-to. |
| Before method / paid-to | rows and section omitted. |
| Pending | status="pending". |
| With receipt | receiptHref adds the download link. |
money.total / money.line | display per slot (default "EGP 1,234.50"). |
States
| State | Trigger |
|---|---|
| Nobody listed | paidTo=[]: "No creators in this payout yet." |
| More creators | creators > paidTo.length: "and N more". |
| No proof | no onOpenProof / receiptHref: row hidden. |
Usage
<Drawer open={!!payout} onClose={close} title={`Payout · ${payout.date}`} hideTitle>
<PayoutBatchDetail date="11 Nov 2026" amount="96420.00" creators={112} method="Bank transfer" reference="88531"
onOpenProof={() => setModal('proof')} receiptHref={payout.receiptUrl}
paidTo={[
{ person: { id: 9, name: 'Tarek Fathy' }, amount: '4120.00' },
{ person: { id: 2, name: 'Salma Hosny' }, amount: '3380.00' },
]}
onOpenCreator={openCreator} onExport={exportCsv} />
</Drawer>
<Modal open={modal === 'proof'} title="Transfer proof" onClose={() => setModal(null)}><ReceiptCard {...proof} /></Modal>Where it appears
- Brand › Payments › Payouts › payout drawer (
openPayout()) (BrandWallet).
Guidelines
Do
- Show the first few creators and let Export CSV give the full list.
- Always offer the proof when the server has one.
Don't
- Don't send empty strings for unknown method / reference; leave them out.
RTL and Arabic
- Mirrors; reference and money LTR. Arabic: "دفعة · …", "اتدفع لمين", "نزّل CSV للقايمة كاملة".
Tokens
DrawerHead lime (--lime-50, --olive), KeyValue, RowItems, ProofButton tokens.
Accessibility
- Proof buttons are named with their context ("View proof, Reference 88531"); rows are a named list; money keeps its "?".
Found in the source
- No roles, ARIA attributes or key handling are set in this component's own source; it renders native elements and the components it composes.
Read from the component's source and tests. See Accessibility for the patterns the library follows.
Related
See also: KeyValue · MoneyNote · Money · StatusPill · DrawerHead · RowItems · useLanguage · useMoneyDisplay · WalletHealthCard · WalletLedger
Source
src/blocks/payments/PayoutBatchDetail.tsx (line 83) on GitHub.