Skip to Content
BBRICKSv0.7.4
KitPrimitives

PlatformFollowers

Every platform with followers; a 0 or missing count is not shown (B2-3: YouTube is always null today), nor is a platform outside the provider's platforms.

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

Examples

Followers cell

Totals with a per-platform breakdown; a platform with null or 0 is left out.

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

function Cell() {
  return <FollowersCell followers={{ instagram: 143000, tiktok: 310000, youtube: 56000 }} />;
}

Platform pill and list

One platform with its count, or every platform a creator has.

Code
import { PlatformFollowers, PlatformPill } from '@ergasti/bricks';

function Pills() {
  return (
    <div style={{ display: 'grid', gap: 12 }}>
      <PlatformPill platform="instagram" count={48200} />
      <PlatformFollowers followers={{ instagram: 48200, tiktok: 120300, youtube: null }} />
    </div>
  );
}

Props

Prop

Type

Design guidance

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

A wrapping row of PlatformPills, one per platform where the creator has followers; use it in creator cards and panels to show reach by platform.

PlatformFollowers is the mock's .plats: it renders a PlatformPill for each platform in the order Instagram, TikTok, YouTube, skipping any with a 0, null or missing count and any the provider's platforms does not include (YouTube is always null today). With nothing to show it renders nothing.

Anatomy

  1. Row (span.kit-plats): flex, wraps, 6px gap.
  2. Pills: PlatformPill per shown platform.

Variants

None. What shows depends on the data and the provider's platforms.

States

StateTriggerLook
Severalcounts on 2–3 platforms2–3 pills
Oneone countOne pill
Noneno positive countsRenders null

Usage

<PlatformFollowers followers={{ instagram: 48200, tiktok: 12900, youtube: null }} />

Limit to the platforms the app supports:

<BricksProvider preset={trndrPreset} platforms={['instagram', 'tiktok']}>
  <PlatformFollowers followers={creator.followers} />
</BricksProvider>

Where it appears

  • The mock's plats() creator-card helper; the v3 screens use FollowersCell in tables.
  • Kit gallery; no screen uses it today.

Guidelines

Do

  • Show a "No followers yet" text yourself when it renders nothing and the space would look broken.

Don't

RTL and Arabic

  • The row follows the page direction; each pill is dir="ltr" inside.

Tokens

Via PlatformPill: --line, --card.

Accessibility

  • A plain span row with no role; each pill reads as "Instagram 48.2K" (the platform name is visually hidden text, the glyph is hidden). Nothing is colour- or icon-only.
  • When no platform has followers it renders nothing, so nothing is read: if the absence matters, write it ("No followers yet").
  • Not interactive.

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: useBricks · Icon · Avatar · AvatarStack · Button · ButtonLink

Source

src/kit/primitives/PlatformPill.tsx (line 33) on GitHub.

On this page