Skip to Content
BBRICKSv0.7.4
KitPrimitives

Strong

Inline bold emphasis inside running text (a to-do line, a banner), optionally coloured: the mock's <b style="color:var(--rasp)">. The words carry the meaning; the colour only adds to it.

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

Examples

Tones

Bold emphasis inside a sentence: plain (the surrounding ink), tone="bad" (raspberry, an alert) or tone="ok" (green). The words carry the meaning; the colour only adds to it.

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

function Tones() {
  return (
    <div style={{ display: 'grid', gap: 8 }}>
      <p>Your wallet is <Strong>running down</Strong>.</p>
      <p>Your wallet is <Strong tone="bad">low (17% left)</Strong>.</p>
      <p>This payout was <Strong tone="ok">paid on time</Strong>.</p>
    </div>
  );
}

In a banner

Emphasis stays inline, so it works anywhere a sentence does.

Code
import { Banner, Strong } from '@ergasti/bricks';

function InABanner() {
  return <Banner tone="warn">Glow Lab’s wallet is <Strong tone="bad">low (17% left)</Strong>. Top it up before orders are held.</Banner>;
}

Props

Prop

Type

Design guidance

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

Inline bold emphasis inside running text, optionally raspberry (alert) or green (good); use it to make the key words of a to-do or banner line stand out.

Strong is the mock's <b style="color:var(--rasp)">: a <b> that keeps the surrounding ink, or colours the words with tone. The words carry the meaning; the colour only adds to it, so the sentence must make sense read plain.

Anatomy

  1. Element (b.kit-strong, .kit-strong--bad / --ok): the children.

Variants

toneLookWhen
none (default)Bold, surrounding colourNeutral emphasis ("17 invites")
'bad'Bold --raspAn alert ("low (17% left)")
'ok'Bold --okA good result ("all paid")

States

None.

Usage

The Home to-do:

<TodoItem icon="wallet" tone="rasp" href="#payments/wallet">
  Your wallet is <Strong tone="bad">low (17% left)</Strong>. Top up so coupons keep working.
</TodoItem>
<TodoItem icon="mail" tone="sky" href="#creators/invitations"><Strong>17 invites</Strong> are waiting for a creator’s reply</TodoItem>

Where it appears

  • Brand › Home › "To-do list" card lines ("Your wallet is low (17% left)…").
  • Screen: Home.

Guidelines

Do

  • Emphasise only the few words that matter.
  • Write the sentence so it reads correctly without colour.

Don't

  • Don't use it as a heading or a figure; use Money / card headers.

RTL and Arabic

  • Inline in the sentence; no mirroring.

Tokens

--rasp, --ok.

Accessibility

  • A <b> is not announced differently; meaning stays in the words.

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.

  • Delta: trend numbers with direction.
  • Banner: a whole alert line.

See also: Avatar · AvatarStack · Button · ButtonLink

Source

src/kit/primitives/Strong.tsx (line 18) on GitHub.

On this page