Skip to Content
BBRICKSv0.7.4
BlocksShared

CalloutCard

The mock's tinted call-to-action cards: "Grow your program" (lime, layout="row": words at the start, actions at the end, wrapping), the Invitations tab's "Invite link" (lime) and "Invite TRNDR creators" (rasp) stacked cards, the PR portal's Messages "Message creators" card (lilac, row). A region named by its heading. size="lg" (opt-in) is the Invitations tab's 21px title. Default 'default' (17px).

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

Examples

Callouts

A tinted card with a title, a sentence and content: in a row the content sits beside the text, in a stack below it.

Code
import { Button, CalloutCard, CopyLinkField } from '@ergasti/bricks';

function Tones() {
  return (
    <div style={{ display: 'grid', gap: 16 }}>
      <CalloutCard tone="lime" layout="row" title="Grow your program" sub="Share your link: creators land on your brand page in TRNDR and apply.">
        <CopyLinkField value="trndr.app/join/hushup" />
        <Button variant="rasp">Find creators</Button>
      </CalloutCard>
      <CalloutCard tone="rasp" title="Invite TRNDR creators" sub="Invite approved creators yourself."><Button variant="rasp">Find creators</Button></CalloutCard>
    </div>
  );
}

All tones

The five tints side by side: lime and rasp (the brand mock's invite cards), lilac (the PR mock's "Message creators" card), sky and butter. Each sets the background, the border and the ink of the title and sentence.

Code
import { Button, CalloutCard } from '@ergasti/bricks';

function AllTones() {
  const tones = ['lime', 'rasp', 'lilac', 'sky', 'butter'] as const;
  return (
    <div style={{ display: 'grid', gap: 16, gridTemplateColumns: 'repeat(auto-fit, minmax(220px, 1fr))' }}>
      {tones.map((tone) => (
        <CalloutCard key={tone} tone={tone} title={`tone="${tone}"`} sub="A sentence about what to do next."><Button variant="ink">Act</Button></CalloutCard>
      ))}
    </div>
  );
}

Message creators

The PR portal's Messages call to action: a lilac row card with the words at the start and an ink "New message" button at the end.

Code
import { Button, CalloutCard, Icon } from '@ergasti/bricks';

function MessageCreators() {
  return (
    <CalloutCard tone="lilac" layout="row" title="Message creators" sub="Send from TRNDR or on behalf of a brand. Creators get it in their TRNDR app notifications.">
      <Button variant="ink"><Icon name="plus" />New message</Button>
    </CalloutCard>
  );
}

Message creators, in Arabic

The lilac row mirrors: words on the right, the button on the left.

Pinned to Arabic
Code
import { Button, CalloutCard, Icon } from '@ergasti/bricks';

function MessageCreatorsArabic() {
  return (
    <div dir="rtl">
      <CalloutCard tone="lilac" layout="row" title="ابعت لصنّاع المحتوى" sub="ابعت من TRNDR أو باسم براند. صنّاع المحتوى هيلاقوها في إشعارات تطبيق TRNDR.">
        <Button variant="ink"><Icon name="plus" />رسالة جديدة</Button>
      </CalloutCard>
    </div>
  );
}

Large title

size="lg" gives the title 21px, as the Invitations tab's two callouts ("Invite link", "Invite TRNDR creators"). Default 17px.

Code
import { Button, CalloutCard, CopyLinkField } from '@ergasti/bricks';

function Large() {
  return (
    <div style={{ display: 'grid', gap: 16, gridTemplateColumns: 'repeat(auto-fit, minmax(280px, 1fr))' }}>
      <CalloutCard size="lg" tone="lime" title="Invite link" sub="Share anywhere. Creators land on your brand page in TRNDR and apply."><CopyLinkField value="trndr.app/join/hushup" /></CalloutCard>
      <CalloutCard size="lg" tone="rasp" title="Invite TRNDR creators" sub="Browse approved creators and invite them in one click."><Button variant="rasp">Find creators</Button></CalloutCard>
    </div>
  );
}

Props

Prop

Type

Design guidance

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

A tinted call-to-action card: a heading, a sub line and its actions on a pastel background; use it to invite the next step ("Grow your program", "Invite TRNDR creators", "Message creators"), at most one or two per page.

It covers the mocks' tinted cards: Brand Home's "Grow your program" (lime, row layout, the invite link and Find creators), the Creators › Invitations tab's "Invite link" (lime) and "Invite TRNDR creators" (rasp) stacked cards, and the PR Portal's Messages "Message creators" card (lilac, row). It is a region named by its heading; the actions are whatever you put in children.

Anatomy

  1. Section (.kit-blk-callout): 22px padding, radius --r-lg, 1px tinted border, tinted background and ink.
  2. Words (.kit-blk-callout-t): the <h2> title (display face, 17px or 21px with size="lg", 700) and the sub (.kit-blk-callout-sub, 13px).
  3. Actions (.kit-blk-callout-act): flex, gap 8, wrapping; typically a CopyLinkField and/or a Button. In the row layout a CopyLinkField input is 220px wide.

Variants

PropValueLookUse when
tone'lime'--lime-50 fill, olive inkGrowth and invite link (Brand Home, Invitations).
tone'rasp'--rasp-50 fill, wine inkInviting TRNDR creators.
tone'lilac'--lilac fill, lilac inkPR Portal Messages "Message creators".
tone'sky'--sky fill, sky inkInformational next step.
tone'butter'--butter fill, butter inkMotivation / rewards prompts.
layout'stack' (default)Actions under the wordsHalf-width cards (Invitations tab).
layout'row'Words at the start, actions at the end, wrappingFull-width strips (Home, PR Messages).
size'default' (default)17px titleMost callouts.
size'lg'21px titleThe Invitations tab's callouts.

States

Static: no hover, loading or error of its own. Without children the actions row is not rendered (story Large). In the row layout, narrow widths wrap the actions under the words.

Types

CalloutTone (tone): 'lime' | 'rasp' | 'lilac' | 'sky' | 'butter': background, border and ink.

Usage

// Brand › Home, the last row
<CalloutCard
  tone="lime"
  layout="row"
  title="Grow your program"
  sub="Share your link: creators land on your brand page in TRNDR and apply. Or invite approved TRNDR creators yourself."
>
  <CopyLinkField value="trndr.app/join/hushup" />
  <Button variant="rasp" onClick={() => navigate('/find')}>Find creators</Button>
</CalloutCard>
// Creators › Invitations: two stacked callouts side by side above the table
<div className="scr-grid scr-grid--2">
  <CalloutCard tone="lime" title="Invite link" sub="Share anywhere. Creators land on your brand page in TRNDR and apply.">
    <CopyLinkField value="trndr.app/join/hushup" />
  </CalloutCard>
  <CalloutCard tone="rasp" title="Invite TRNDR creators" sub="Browse approved creators and invite them in one click. Each invite holds a seat until they reply.">
    <Button variant="rasp">Find creators</Button>
  </CalloutCard>
</div>
// PR Portal › Messages
<CalloutCard tone="lilac" layout="row" title="Message creators"
  sub="Send from TRNDR or on behalf of a brand. Creators get it in their TRNDR app notifications.">
  <Button variant="ink" onClick={openComposer}>New message</Button>
</CalloutCard>

Where it appears

  • Brand › Home › "Grow your program" strip (lime, row) at the bottom of the page. Screen: Home.
  • Brand › Creators › Invitations tab › "Invite link" (lime) and "Invite TRNDR creators" (rasp) above the invitations table. Screen: Creators · Invitations.
  • PR Portal › Messages › "Message creators" (lilac, row). Screen: PR · Messages.

Guidelines

Do

  • Lead with a verb-led title and one sentence that says what happens.
  • Keep to one primary action (plus a CopyLinkField when sharing a link).
  • Use row for full-width strips and stack for cards in a grid.

Don't

  • Don't stack more than two callouts on a page; they compete.
  • Don't use it for warnings or status: use Banner.
  • Don't put a table or a list inside; link to the screen instead.

RTL and Arabic

  • Words and actions swap sides in the row layout; the title's negative letter-spacing is reset to 0 in RTL for Arabic.
  • Arabic sub lines run longer: prefer stack when space is tight.

Tokens

--lime-50, --olive, --rasp-50, --rasp-100, --lilac, --lilac-ink, --sky, --sky-ink, --butter, --butter-ink, --line, --r-lg, --font-family-display.

Accessibility

  • <section aria-labelledby> its <h2>, so it is a named region in the landmarks list. Check the heading level fits the page outline (it is always h2).
  • Ink on tint passes contrast for each tone (olive on lime-50, wine on rasp-50, the tone inks on their fills).
  • Actions are your own controls; give buttons visible words.

Found in the source

  • ARIA attributes set: aria-labelledby.

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

  • CopyLinkField: the read-only invite link with Copy that usually sits inside.
  • Banner: status and warnings, not calls to action.
  • HeroCard: the dark headline card with figures.
  • EmptyView: when the whole region has nothing yet.

See also: Button · Icon · CheckList · DrawerHead · ProgressRow

Source

src/blocks/shared/CalloutCard.tsx (line 25) on GitHub.

On this page