PrCreatorDrawer
The PR portal's creator drawer (v3 mock openCreator): photo, name, followers per platform, tier and status; the join request it was opened from; all-time sales and delivered orders; the TRNDR score with its parts (or why there is none: still measuring, or a customer affiliate); since when, which brands, the tier and where it comes from (set by PR / from score / no score yet) with "Change"; when a rejected creator can reapply; the privacy note; Approve / Reject for a pending creator or a join request. On the kit Drawer (focus trap, Escape).
import { PrCreatorDrawer } from '@ergasti/bricks';Examples
Creator drawer
Figures, the TRNDR score, the brands, and the tier with where it comes from ("from score", "set by PR") and "Change". A pending creator, or one opened from a join request, gets Approve / Reject.
Code
import { useState } from 'react';
import { Button, PrCreatorDrawer, type PrDrawerCreator } from '@ergasti/bricks';
const nour: PrDrawerCreator = {
id: 2, name: 'Nour Hassan', followers: { instagram: 120000, tiktok: 340000 }, status: 'active', tier: 'elite', tierSource: 'score', score: 91,
scoreParts: [{ key: 'followers', points: 19, reading: '460K followers' }, { key: 'engagement', points: 25, reading: '8.0% engagement' }, { key: 'on_time', points: 7, reading: '7 of 10 on time' }],
sales: '212000.00', orders: 702, joined: 'Jun 2026', brands: ['Glow Lab', 'Mira Beauty', 'Kemet Home', 'Nile Threads'],
};
function Drawer() {
const [open, setOpen] = useState(false);
return (
<>
<Button onClick={() => setOpen(true)}>Open Nour Hassan</Button>
<PrCreatorDrawer open={open} onClose={() => setOpen(false)} creator={nour} money={{ decimals: 'auto' }} onChangeTier={() => {}} onExplainScore={() => {}} />
</>
);
}The kit score card, from a join request
scoreVariant="card" draws the TRNDR score as an inset kit Card with stacked DetailsBars rows; join adds the banner and Reject / Approve under a line. The head is the PR mock's (64px photo, 20px name); headerStyle="default" brings back 0.6.0's.
Code
import { useState } from 'react';
import { Button, PrCreatorDrawer, type PrDrawerCreator } from '@ergasti/bricks';
const nour: PrDrawerCreator = {
id: 2, name: 'Nour Hassan', followers: { instagram: 120000, tiktok: 340000 }, status: 'active', tier: 'elite', tierSource: 'score', score: 91,
scoreParts: [{ key: 'followers', points: 19, reading: '460K followers' }, { key: 'engagement', points: 25, reading: '8.0% engagement' }, { key: 'on_time', points: 7, reading: '7 of 10 on time' }],
sales: '212000.00', orders: 702, joined: 'Jun 2026', brands: ['Glow Lab', 'Mira Beauty', 'Kemet Home', 'Nile Threads'],
};
function KitScoreCard() {
const [open, setOpen] = useState(false);
return (
<>
<Button onClick={() => setOpen(true)}>Open Nour Hassan</Button>
<PrCreatorDrawer open={open} onClose={() => setOpen(false)} creator={nour} scoreVariant="card" join={{ brand: 'Glow Lab', source: 'Creator request', days: 8 }}
onApprove={() => setOpen(false)} onReject={() => setOpen(false)} money={{ decimals: 'auto' }} onChangeTier={() => {}} onExplainScore={() => {}} />
</>
);
}Props
Prop
Type
Labels
Every word this component draws, in both languages. Override one per component and language with BricksProvider labels under the key prCreatorDrawer, or with the component's own prop where it has one. A {name} is a value the component fills in.
| Key | English | Arabic |
|---|---|---|
platforms.instagram | IG | إنستجرام |
platforms.tiktok | TikTok | تيك توك |
platforms.youtube | YouTube | يوتيوب |
sep | · | · |
sales | All-time sales | المبيعات من الأول |
orders | Delivered orders | الطلبات اللي اتسلمت |
since | On TRNDR since | على TRNDR من |
brands | Brands | البراندات |
noBrands | None yet | لسه مفيش |
tier | Tier | المستوى |
source.manual | set by PR | حدده الـ PR |
source.score | from score | من التقييم |
source.none | no score yet | لسه مفيش تقييم |
change | Change | غيّر |
changeTier | Change {n}’s tier | غيّر مستوى {n} |
reapply | Can reapply | يقدر يقدّم تاني |
privacy | The shipping address is never shown to brands. | عنوان الشحن عمره ما بيظهر للبراندات. |
approve | Approve | وافق |
reject | Reject | ارفض |
busy | Working… | لحظة… |
wants | Wants to join {brand} · {source} · waiting {waiting2} | عايز يشترك في {brand} · {source} · مستني {waiting2} |
days | {s} days | {s} يوم |
approveName | Approve {n} | وافق على {n} |
rejectName | Reject {n} | ارفض {n} |
Design guidance
How the BRICKS design system uses PrCreatorDrawer. Written in docs/content/components/PrCreatorDrawer.md; the props above are read from the code, which wins where the two disagree.
The PR Portal's creator drawer: photo, followers, tier and status, sales and orders, the TRNDR score with its parts, brands, where the tier comes from, and Approve / Reject when a decision is open; use it when PR opens a creator from any table.
PrCreatorDrawer is the v3 mock's openCreator. It replaces the v2 DetailsDrawer recipe with one block that reads one PrDrawerCreator record. Opened from a join request it adds a "Wants to join Glow Lab · Creator request · waiting 8 days" banner and the decision buttons. A customer affiliate (track="customer") shows no score, tier, gifts or challenges. It sits on the kit Drawer (focus trap, Escape) and fetches nothing.
Anatomy
- Drawer head: a 64px
Avatar(lead), the name as title (<bdi>), then the follower line "IG 120K · TikTok 340K" and the chips:TierChip(not for customers) andPrStatusPill. - Join banner (with
join): infoBannerwith a check icon. - Figure tiles: two
Tile size="stat": "All-time sales" (rasp, with its money note) and "Delivered orders" (lime); 19px values here. - TRNDR score: a
ScoreBreakdowncard (score and nine parts, or "Still measuring" / "Customer"). - Facts: a
SummarySectionof lines: "On TRNDR since", "Brands" (or "None yet"), "Tier" (chip, "set by PR" / "from score" / "no score yet", and a "Change" link), "Can reapply" for a rejected creator. - Privacy note: "The shipping address is never shown to brands." over a rule.
- Footer (decision open and handlers given): "Reject" and ink "Approve", sharing the width.
Variants
| Situation | Data | What changes |
|---|---|---|
| Scored creator | score 0-100, scoreParts, tierSource: 'score' | Score card with parts; tier "from score" |
| Tier set by PR | tierSource: 'manual' | Tier line reads "set by PR" |
| Customer affiliate | track: 'customer' | No tier chip or line; score card says "Customer" |
| Pending | status: 'pending' | Approve / Reject footer |
| Join request | join={{ brand, source, days }} | Banner and Approve / Reject footer |
| Rejected | status: 'rejected', reapplyOn | "Can reapply 24 Nov 2026" line |
| No score yet | score: null | Score card "Still measuring"; tier "no score yet" |
States
| State | Trigger |
|---|---|
| Closed / open | open |
| Busy | busy: both buttons disabled, Approve reads "Working…" with aria-busy |
| No brands | brands: []: "None yet" |
| No followers | followers empty or zeros: no follower line |
| Long name | wraps in the title; <bdi> keeps mixed scripts in order |
Types
PrDrawerCreator: id: number, seed? (avatar colour, default id), name, avatarUrl?, followers? (per platform), status (PR status key), track? ('creator' | 'customer'), tier?, tierSource? ('manual' | 'score'), score: number | null, scoreParts?: ScorePart[], sales (2-dp string), orders: number, joined (formatted), brands: string[], reapplyOn?.
Usage
import { PrCreatorDrawer } from '@ergasti/bricks';
<PrCreatorDrawer
open={openId != null}
onClose={() => setOpenId(null)}
creator={{
id: 1, name: 'Nour Hassan', followers: { instagram: 120000, tiktok: 340000 },
status: 'active', tier: 'elite', tierSource: 'score', score: 91, scoreParts: parts,
sales: '212000.00', orders: 702, joined: 'Jun 2026', brands: ['Glow Lab', 'Mira Beauty', 'Kemet Home'],
}}
onChangeTier={() => setTierDialog(true)}
onExplainScore={() => setExplainer(true)}
/>// Approvals: opened from a join request row, with the decision and its follow-up dialogs
<DataTable label="Join requests" rows={rows} rowKey={(r) => r.id}
columns={joinRequestColumns('en', { onApprove: approve, onReject: askReason, onOpen: (r) => setOpen(r) })} />
{open && (
<PrCreatorDrawer
open
onClose={() => setOpen(null)}
creator={toDrawerCreator(open)}
join={{ brand: 'Glow Lab', source: 'Creator request', days: 8 }}
onApprove={() => approve(open)}
onReject={() => askReason(open)}
busy={saving}
/>
)}
<TierChangeDialog open={tierDialog} onClose={() => setTierDialog(false)} onSave={saveTier}
name="Nour Hassan" tier="elite" source="score" score={91} tiers={['rising', 'established', 'influential', 'elite']} />
<ScoreExplainer open={explainer} onClose={() => setExplainer(false)} />Creator drawer. Figures, the TRNDR score, the brands, and the tier with where it comes from ("from score", "set by PR") and "Change". A pending creator, or one opened from a join request, gets Approve / Reject. (docs example Drawer)
import { useState } from 'react';
import { Button, PrCreatorDrawer, type PrDrawerCreator } from '@ergasti/bricks';
const nour: PrDrawerCreator = {
id: 2, name: 'Nour Hassan', followers: { instagram: 120000, tiktok: 340000 }, status: 'active', tier: 'elite', tierSource: 'score', score: 91,
scoreParts: [{ key: 'followers', points: 19, reading: '460K followers' }, { key: 'engagement', points: 25, reading: '8.0% engagement' }, { key: 'on_time', points: 7, reading: '7 of 10 on time' }],
sales: '212000.00', orders: 702, joined: 'Jun 2026', brands: ['Glow Lab', 'Mira Beauty', 'Kemet Home', 'Nile Threads'],
};
export function Drawer() {
const [open, setOpen] = useState(false);
return (
<>
<Button onClick={() => setOpen(true)}>Open Nour Hassan</Button>
<PrCreatorDrawer open={open} onClose={() => setOpen(false)} creator={nour} money={{ decimals: 'auto' }} onChangeTier={() => {}} onExplainScore={() => {}} />
</>
);
}Where it appears
- PR Portal › Creators › row click (scored creator, customer affiliate).
- PR Portal › Approvals › join request or new creator row (banner, Approve / Reject).
- PR Portal › Tiers › a creator from recent moves.
- Dashboard screen: PrCreators (the screen); the drawer is also a gallery screen of its own.
Guidelines
Do
- Pass
joinonly when the drawer was opened from that request; otherwise leave it out. - Wire
onChangeTiertoTierChangeDialogandonExplainScoretoScoreExplainer. - Keep
busyon until the server answers, then close or refresh the record.
Don't
- Don't show a tier or score for a customer affiliate (set
track: 'customer'). - Don't add the shipping address or contact details: the privacy note promises brands never see it, and the drawer is the PR view of the same record.
- Don't use the deprecated
DetailsDrawerrecipe for creators.
RTL and Arabic
The drawer slides from the inline end and mirrors. Arabic words: "المبيعات من الأول", "الطلبات اللي اتسلمت", "على TRNDR من", "حدده الـ PR" / "من التقييم", "وافق" / "ارفض"; platforms "إنستجرام", "تيك توك". Follower counts stay "120K".
Tokens
--line, --ink-3, --card, --r-lg, --rasp, --track, --font-family-display, plus the Drawer's, Tile's and Banner's tokens.
Accessibility
- Kit Drawer:
role="dialog",aria-modal, labelled by the name; focus trap, Escape, focus returns to the opener; the page behind is inert. - Approve / Reject have full names ("Approve Nour Hassan", "Reject Nour Hassan"); the tier link "Change Nour Hassan's tier".
- The score's bars are decorative; points are written out (and read "25 of 25 points").
- Figures and names use
<bdi>so Arabic and Latin mix safely.
Found in the source
- ARIA attributes set:
aria-label,aria-busy. - Its tests cover: “Escape closes; Arabic: the platforms, the labels and the house terms”; “scoreVariant=”.
Read from the component's source and tests. See Accessibility for the patterns the library follows.
Related
ScoreBreakdown/ScoreExplainer: the score card inside it and the "How the score works" modal.TierChangeDialog: the "Change" link's dialog.ApprovalActions: Approve / Reject in a table row.Drawer(kit): any other side panel.
See also: Avatar · Banner · Button · Money · MoneyNote · TierChip · Tile · useLanguage · SummaryLine · SummarySection · PrStatusPill · BulkAction
Source
src/pr/creators/PrCreatorDrawer.tsx (line 125) on GitHub.