Skip to content

Callout

Highlighted block that draws attention to supporting information, tips, or guidance inline with content.

  • stable
  • since v0.1.0
  • 0.72 kB
  • feedback
  • info
  • content

Renders a plain <div> container — pair with a CalloutTitle so screen readers can announce intent. Decorative icons are wrapped in a non-semantic span; pass icon={false} (or omit) to skip the icon slot.

Preview
Open
tsx

Callout ships five colour schemes — accent (default), neutral, success, warning, and danger. Pick the tone that matches the supporting message.

Preview
Open
tsx

Switch to variant="outline" for a lighter, border-only treatment that recedes into dense layouts. The default soft variant uses a tinted surface.

Preview
Open
tsx

Pass any node to the icon prop. Icons are wrapped in an aria-hidden span, so colour and shape stay decorative.

Preview
Open
tsx
PropTypeDefaultDescription
colorScheme
"accent"|"neutral"|"success"|"warning"|"danger"
accent
Semantic palette. One of `accent`, `neutral`, `success`, `warning`, `danger`.
variant
"soft"|"outline"
soft
Visual style. `soft` is a tinted surface; `outline` is bordered.
icon
ReactNode
Leading icon node. Pass `false` to skip rendering an icon slot.
  • Use CalloutTitle (renders a <p> by default; pass as="h3" for a heading) so the callout is labelled for assistive tech.
  • Colour alone never carries meaning — keep a textual title that conveys intent (e.g. “Heads up”, “Required”).
  • Reserve Callout for non-urgent context. Use Alert when the content is interruptive or live.
  • Inline icons render inside a decorative wrapper; supply text labels in CalloutContent for screen readers.
  • Use callouts for tips, notes, and “good to know” asides inside long-form documentation.
  • Promote CalloutTitle to a heading (as="h3") when the callout introduces a new section.
  • Combine variant="outline" with colorScheme="neutral" for a quiet “note” treatment.
  • Reserve a single callout colour per page so the visual rhythm stays calm.