Skip to Content
BBRICKSv0.7.4
BlocksCreators

HighlightBadge

The Find card's highlight line (.hl): one reason to look at this creator ("Top 10% seller on TRNDR", "Growing fast · +64% sales this month", "Won 2 challenges", "3.1% engagement") on its own tint, the emoji decorative.

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

Examples

Highlights

A one-line reason to look at a creator, with an icon for the kind; onWhite is for use on a white surface.

Code
import { HighlightBadge } from '@ergasti/bricks';

function Kinds() {
  return (
    <div style={{ display: 'flex', gap: 10, flexWrap: 'wrap' }}>
      <HighlightBadge kind="fire">Top 10% seller on TRNDR</HighlightBadge>
      <HighlightBadge kind="star">Won 2 challenges</HighlightBadge>
      <HighlightBadge kind="spark">2.2% engagement</HighlightBadge>
      <HighlightBadge kind="up" onWhite>Growing fast · +64% sales this month</HighlightBadge>
    </div>
  );
}

Props

Prop

Type

Design guidance

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

A small tinted pill with an emoji and one reason to look at a creator ("Top 10% seller on TRNDR", "Growing fast · +64% sales this month"); use it once per creator card or profile.

It is the mock's highlight line (.hl-*, 🔥 📈 🏆 ✨) on Brand › Find creators cards and the mini profile hero. The emoji is decorative; the text carries the meaning. The text comes from the server with its kind.

The four emoji (🔥 📈 🏆 ✨) are the component's intended marks, one of the few emoji the brand book allows: the library draws them itself (aria-hidden), and the badge text carries the meaning. Do not add other emoji next to it.

Anatomy

  1. Pill: span.kit-blk-hl.kit-blk-hl--<kind>, inline-flex, padding 5px 12px, radius 99, 12.5px / 700.
  2. Emoji: i, aria-hidden.
  3. Text: children.

Variants

kindEmoji / coloursWhen
'fire'🔥 on #FFE9DE, #A2431ATop seller.
'up'📈 on --ok-bg, --okGrowing fast.
'star'🏆 on --butter, --butter-inkChallenge wins.
'spark'✨ on --lilac, --lilac-inkEngagement.
onWhiteWhite pill, centred, 12px aboveOn a tinted hero (the mini profile).

States

Static.

Usage

<HighlightBadge kind="fire">Top 10% seller on TRNDR</HighlightBadge>
<HighlightBadge kind="up">Growing fast · +64% sales this month</HighlightBadge>
// On the profile hero
<HighlightBadge kind="star" onWhite>Won 2 challenges</HighlightBadge>

Where it appears

Guidelines

Do

  • One badge per creator; a specific, true sentence.

Don't

RTL and Arabic

  • Emoji stays at the inline start; text in the page language.

Tokens

--ok-bg, --ok, --butter, --butter-ink, --lilac, --lilac-ink, --card.

Accessibility

  • A plain span, not interactive, no role: read as its text in the reading order of the card.
  • The emoji sits in an aria-hidden <i>, so screen readers read only the sentence ("Top 10% seller on TRNDR"). The text must say the reason on its own; never pass only a number.
  • Inside FindCreatorCard it sits under the card's hit button, so its text is not part of that button's name (the button is named by the creator's name).
  • Contrast (12.5px / 700): fire #A2431A on #FFE9DE 5.4:1 (6.3:1 on white with onWhite); up --ok on --ok-bg 4.6:1 (5.2:1 on white); star --butter-ink on --butter 6.0:1; spark --lilac-ink on --lilac 6.5:1.
  • Colour is decoration only; the kinds are told apart by their words.

Found in the source

  • ARIA attributes set: aria-hidden.

Read from the component's source and tests. See Accessibility for the patterns the library follows.

See also: FactsGrid · FollowerBars

Source

src/blocks/creators/HighlightBadge.tsx (line 12) on GitHub.

On this page