Skip to Content
BBRICKSv0.7.4
BlocksGroups

GroupPanel

The group drawer's body: a tinted head with three faces, the group's sales, commission in force, the special commission's state and what was asked, the actions (ask / change, Edit, and back to standard), then its creators. commissionMode="set" is the console's direct special commission (% of sale or EGP per item, no TRNDR approval). Sales are optional; moreMembers adds "and N more".

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

Examples

Group drawer body

The group's members with their sales, its commission state, and the actions for it: ask TRNDR for a special rate, edit, back to the standard rate. The status words come from the TRNDR preset, so this example is pinned to it.

Pinned to TRNDR preset
Code
import { GroupPanel } from '@ergasti/bricks';
import { blocksData } from './sample-data';

function Panel() {
  const g = blocksData.GROUPS[0];
  const members = g.members.map((m) => ({ ...m, tier: m.tier }));
  return (
    <div style={{ maxWidth: 400 }}>
      <GroupPanel name={g.name} tone={g.tone} members={members} sales={blocksData.groupSales(members)} commission={g.commission} onAskCommission={() => {}} onEdit={() => {}} onBackToStandard={() => {}} onOpenCreator={() => {}} />
    </div>
  );
}

Standard commission, another rate

With a standard commission the panel offers "Ask for a special commission"; standardRate is the rate it names. groupLabels overrides the commission words shared with GroupCard.

Pinned to TRNDR preset
Code
import { GroupPanel } from '@ergasti/bricks';
import { blocksData } from './sample-data';

function Standard() {
  const g = blocksData.GROUPS[1];
  return (
    <div style={{ maxWidth: 400 }}>
      <GroupPanel name={g.name} tone={g.tone} members={g.members} sales={blocksData.groupSales(g.members)} commission={{ state: 'standard' }} standardRate="10%" onAskCommission={() => {}} onEdit={() => {}} groupLabels={{ standard: (rate) => `Program rate ${rate}` }} />
    </div>
  );
}

The brand sets the special commission

commissionMode="set": Commission ("20% of sale", "EGP 30 per item", the standard or "Mixed"), Special commission ("Set" or "None"), Set on (setOn); "Set special commission" / "Change special commission" (open SpecialCommissionForm mode="set"), "Back to standard" while one is set. Sales are optional, and moreMembers adds "and N more".

Code
import { GroupPanel } from '@ergasti/bricks';
import { blocksData } from './sample-data';

function SetRate() {
  const g = blocksData.GROUPS[0];
  return (
    <div style={{ maxWidth: 400 }}>
      <GroupPanel commissionMode="set" name={g.name} tone={g.tone} members={g.members.map((m) => ({ ...m, sales: null }))} moreMembers={8}
        commission={{ state: 'set', kind: 'per_item', value: '30' }} onAskCommission={() => {}} onEdit={() => {}} onBackToStandard={() => {}} />
    </div>
  );
}

Props

Prop

Type

Labels

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

groupPanel
KeyEnglishArabic
salesSalesالمبيعات
commissionCommissionالعمولة
specialSpecial commissionالعمولة الخاصة
noneNoneمفيش
askedForAsked forاللي طلبته
askAsk for special commissionاطلب عمولة خاصة
changeChange special commissionغيّر العمولة الخاصة
editEditعدّل
backToStandardBack to standardارجع للعمولة العادية
creatorsCreatorsصنّاع المحتوى
emptyNo creators in this group yet.لسه مفيش صنّاع محتوى في المجموعة دي.
setSet special commissionحدد عمولة خاصة
setPillSetمتحددة
setOnSet onاتحددت في
moreand 2 moreوليس رقمًا كمان
groupCard
KeyEnglishArabic
creators2 creatorsليس رقمًا صانع محتوى
standardStandard {r}العادية {r}
askedAsked: {l}طلبت: {l}
mixedMixedمختلفة

Design guidance

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

The group drawer's body: a tinted head with faces and member count, the group's sales and commission state, the commission actions (ask / set / change, Edit, Back to standard), then its creators with their sales; open it from a GroupCard.

It is the mock's openGroup() drawer on Brand › Creators › Groups. In the default 'ask' mode the brand asks TRNDR for a special commission (rows: Sales, Commission, Special commission status, Asked for). In 'set' mode (the console's direct special commission, no TRNDR approval) the rows are Sales, Commission in force, Special commission "Set" / "None", Set on. "Back to standard" is offered only while a special commission exists. Sales are optional (left out before the API sends them); moreMembers adds "and N more" under a one-page list.

Anatomy

  1. Head: DrawerHead in the group's tone, three faces (AvatarStack max=3), name, "12 creators".
  2. Rows: KeyValue (see modes below); Sales has the sales "?".
  3. Actions: rasp "Ask for special commission" / "Set special commission" / "Change special commission", "Edit", ghost "Back to standard".
  4. Creators: RowItems headed "Creators" with chevrons, each a person lead and their compact sales (list "?" creator_sales when any sales).
  5. More: muted "and 8 more".

Variants

PropValueRows / buttons
commissionMode="ask" (default)standardCommission "Standard 15%", Special "None", Asked for "—"; "Ask for special commission".
askedSpecial StatusPill with_trndr, Asked for = label; "Change special commission", "Back to standard".
approvedCommission = label, Special StatusPill approved; "Change…", "Back to standard".
commissionMode="set"setCommission = long rate ("EGP 30 per item"), Special "Set" pill, Set on; "Change…", "Back to standard".
mixed / standardCommission "Mixed" / "Standard 15%", Special "None"; "Set special commission".

States

StateTrigger
No membersmembers=[]: "No creators in this group yet."
Before salessales undefined and member sales null: no Sales row, no figures.
Paged membersmoreMembers > 0: "and N more"; head counts them.
Openable creatorsonOpenCreator: rows are buttons.
No actionsno handlers: actions row hidden.

Types

GroupCopy (groupLabels): creators(n), standard(r), asked(l), mixed.

Usage

<Drawer open={!!group} onClose={close} title={<span className="kit-sr">{group.name}</span>}>
  <GroupPanel name="Top sellers" tone="lime" members={group.members} sales="314610.00"
    commission={{ state: 'approved', label: '20% of sale' }}
    onAskCommission={() => setModal('commission')} onEdit={() => setModal('edit')}
    onBackToStandard={confirmBackToStandard} onOpenCreator={openCreator} />
</Drawer>
// Console: the brand sets the rate itself
<GroupPanel name="TikTok first" tone="sky" members={page.rows} moreMembers={page.total - page.rows.length}
  commissionMode="set" commission={{ state: 'set', kind: 'per_item', value: '30' }} setOn="18 Nov 2026"
  onSetCommission={openSetForm} onBackToStandard={backToStandard} />

Where it appears

  • In the v3 mocks: Brand › Creators › Groups › group drawer (openGroup()) (BrandCreators).
  • Library only: the "Back to standard" action and commissionMode="set" (console).

Guidelines

Do

  • Confirm "Back to standard" before calling the API; it removes a rate creators may rely on.
  • Use commissionMode="set" only where the brand may set rates without TRNDR.

Don't

  • Don't show "Asked for" values in set mode; the rows differ by design.

RTL and Arabic

  • Mirrors; money LTR. Arabic: "اطلب عمولة خاصة", "غيّر العمولة الخاصة", "ارجع للعمولة العادية", "و8 كمان".

Tokens

Through its parts: DrawerHead tone pairs, KeyValue (--soft, --ink-3), RowItems (--line), --ink-3.

Accessibility

  • Rows are a KeyValue description list; creators a named list with buttons when openable.
  • Status is said in words (StatusPill), not colour.

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.

See also: KeyValue · AvatarStack · Button · Money · StatusPill · DrawerHead · RowItems · Pill · useLanguage · useMoneyDisplay · CommissionInput · CommissionRate

Source

src/blocks/groups/GroupPanel.tsx (line 98) on GitHub.

On this page