TierChip
The v3 mock's .tier: a soft pair with a dot (Elite: a star), Rising lime, Established sky, Elite gold, Influential teal (its own token pair, D8). No tier yet = Rising (the house default, as TierBadge); an unknown tier renders nothing.
import { TierChip } from '@ergasti/bricks';Examples
Tiers
The chip colours come from the --tier-<key>-bg and --tier-<key>-ink tokens; the words from the provider's tiers. Under the TRNDR preset: Rising, Established, Influential, Elite.
Code
import { TierChip, TRNDR_TIERS } from '@ergasti/bricks';
function Chips() {
return (
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 8 }}>
{Object.keys(TRNDR_TIERS).map((tier) => <TierChip key={tier} tier={tier} />)}
</div>
);
}TierBadge
The same chip under its older name; an unknown or empty tier draws the preset's defaultTier or nothing.
Code
import { TierBadge } from '@ergasti/bricks';
function Badges() {
return (
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 8, alignItems: 'center' }}>
<TierBadge tier="elite" />
<TierBadge tier="rising" />
<TierBadge tier={null} />
<small>(null draws nothing)</small>
</div>
);
}Props
Prop
Type
Design guidance
How the BRICKS design system uses TierChip. Written in docs/content/components/TierChip.md; the props above are read from the code, which wins where the two disagree.
A creator's tier as a small soft pill with a dot (Elite: a star); use it next to a creator's name or in a Tier column.
TierChip is the v3 mock's .tier: 11px 700 text (12px, no letter-spacing in Arabic) on the tier's own soft colour pair, with a 6px dot in the text colour, or an 8px star for Elite. The tier comes from the provider's tiers table (TRNDR's four with no provider). A creator with no tier yet shows the provider's defaultTier (Rising in TRNDR); a tier key the table does not know renders nothing.
Anatomy
- Pill (
span.kit-tierc.kit-tierc--{key}): padding 2px 7px 2px 8px, radius 99px, line-height 16px. - Dot (
::before): 6px circle; star clip-path forelite. - Label:
tiers[key][language].
Variants
| Tier key | Label (en / ar) | Colours |
|---|---|---|
rising | Rising / صاعد | --tier-rising-bg / -ink (lime) |
established | Established / متمكن | --tier-established-* (sky) |
influential | Influential / مؤثر | --tier-influential-* (teal) |
elite | Elite / نخبة | --tier-elite-* (gold), star marker |
A provider tier with bg / ink gets those inline colours instead of tokens.
States
| State | Trigger | Look |
|---|---|---|
| Known tier | key in tiers | Chip |
| No tier | null / undefined | The defaultTier chip (Rising) |
| Unknown tier | key missing | Nothing |
| No default | defaultTier: null and no tier | Nothing |
Usage
<span style={{ display: 'flex', gap: 8, alignItems: 'center' }}><b>Laila Saeed</b><TierChip tier="established" /></span>A Tier column:
interface Creator { id: number; name: string; tier: string | null }
const columns: DataColumn<Creator>[] = [
{ key: 'name', label: 'Creator', primary: true, render: (c) => <b>{c.name}</b> },
{ key: 'tier', label: 'Tier', render: (c) => <TierChip tier={c.tier} /> },
];Another preset's tiers:
<BricksProvider preset={trndrPreset} tiers={{ vip: { en: 'VIP', ar: 'VIP', bg: '#F3E8FF', ink: '#6B21A8' } }}>
<TierChip tier="vip" />
</BricksProvider>Where it appears
- Brand › Home › Top creators (beside names); Brand › Creators › My creators table; Brand › Analytics best creators (via
CreatorCell tier). - PR Portal › Creators table, creator drawer, Tiers ladder, audience picker.
- Screens: Home, Creators, PR · Creators, PR · Tiers.
Guidelines
Do
- Pass the server's tier key; let the provider own words and colours.
- Pass
nullfor new creators so they show the default tier.
Don't
- Don't use tier colours for anything else.
RTL and Arabic
- Arabic labels, 12px with letter-spacing 0 under
[dir='rtl']; the dot sits at the inline start.
Tokens
--tier-rising-bg, --tier-rising-ink, --tier-established-bg, --tier-established-ink, --tier-influential-bg, --tier-influential-ink, --tier-elite-bg, --tier-elite-ink.
Accessibility
- Not interactive and no role: a
spanread as its label ("Established"). The dot or star is a CSS::before, not announced. - Contrast (text on its tint, Brand theme): Rising 5.58:1, Established 6.83:1, Influential 5.68:1 (7.24:1 in the PR theme), Elite 5.24:1; all pass AA at 11–12px bold.
- The tier word is the only cue for screen-reader users, so keep tier labels distinct words, not colours ("Gold", not "Yellow").
- No tier yet reads as the default tier's word ("Rising"); an unknown tier renders nothing, so nothing is read: make sure the provider knows every key the API sends.
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
TierBadge: the same chip under its 0.x name.TierLadder,TierChangeDialog,TierMoveList: PR tier management.
See also: useBricks · Avatar · AvatarStack · Button · ButtonLink
Source
src/kit/primitives/TierChip.tsx (line 24) on GitHub.