Skip to Content
BBRICKSv0.7.4
PR PortalForms and dialogs

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.

prCreatorDrawer
KeyEnglishArabic
platforms.instagramIGإنستجرام
platforms.tiktokTikTokتيك توك
platforms.youtubeYouTubeيوتيوب
sep · ·
salesAll-time salesالمبيعات من الأول
ordersDelivered ordersالطلبات اللي اتسلمت
sinceOn TRNDR sinceعلى TRNDR من
brandsBrandsالبراندات
noBrandsNone yetلسه مفيش
tierTierالمستوى
source.manualset by PRحدده الـ PR
source.scorefrom scoreمن التقييم
source.noneno score yetلسه مفيش تقييم
changeChangeغيّر
changeTierChange {n}’s tierغيّر مستوى {n}
reapplyCan reapplyيقدر يقدّم تاني
privacyThe shipping address is never shown to brands.عنوان الشحن عمره ما بيظهر للبراندات.
approveApproveوافق
rejectRejectارفض
busyWorking…لحظة…
wantsWants to join {brand} · {source} · waiting {waiting2}عايز يشترك في {brand} · {source} · مستني {waiting2}
days{s} days{s} يوم
approveNameApprove {n}وافق على {n}
rejectNameReject {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

  1. 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) and PrStatusPill.
  2. Join banner (with join): info Banner with a check icon.
  3. Figure tiles: two Tile size="stat": "All-time sales" (rasp, with its money note) and "Delivered orders" (lime); 19px values here.
  4. TRNDR score: a ScoreBreakdown card (score and nine parts, or "Still measuring" / "Customer").
  5. Facts: a SummarySection of 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.
  6. Privacy note: "The shipping address is never shown to brands." over a rule.
  7. Footer (decision open and handlers given): "Reject" and ink "Approve", sharing the width.

Variants

SituationDataWhat changes
Scored creatorscore 0-100, scoreParts, tierSource: 'score'Score card with parts; tier "from score"
Tier set by PRtierSource: 'manual'Tier line reads "set by PR"
Customer affiliatetrack: 'customer'No tier chip or line; score card says "Customer"
Pendingstatus: 'pending'Approve / Reject footer
Join requestjoin={{ brand, source, days }}Banner and Approve / Reject footer
Rejectedstatus: 'rejected', reapplyOn"Can reapply 24 Nov 2026" line
No score yetscore: nullScore card "Still measuring"; tier "no score yet"

States

StateTrigger
Closed / openopen
Busybusy: both buttons disabled, Approve reads "Working…" with aria-busy
No brandsbrands: []: "None yet"
No followersfollowers empty or zeros: no follower line
Long namewraps 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 join only when the drawer was opened from that request; otherwise leave it out.
  • Wire onChangeTier to TierChangeDialog and onExplainScore to ScoreExplainer.
  • Keep busy on 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 DetailsDrawer recipe 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.

See also: Avatar · Banner · Button · Money · MoneyNote · TierChip · Tile · useLanguage · SummaryLine · SummarySection · PrStatusPill · BulkAction

Source

src/pr/creators/PrCreatorDrawer.tsx (line 125) on GitHub.

On this page