Skip to content

Block 25 of 297

Callout Box

An inline note, tip or important notice with a visible label, icon and optional link.

Puck key
CalloutBoxBlock
Export
calloutBoxBlock
React component
<CalloutBox />
Path
components/puck/callout-box-block.tsx
Dependencies
None
License
MIT

About this block

When to use it, how to write for it, and what to change in the code.

What it's for

A notice box placed between paragraphs to flag something readers shouldn't miss. It comes in three types: Note (quiet gray), Tip (light indigo) and Important (dark indigo). Each shows a visible text label, an icon and a colored side rule, with an optional title, message and link. Width can match an article column or a full section.

  • Document or eligibility requirements on a service page
  • Deadline or closure notices inside an article
  • Practical tips within a how-to guide
Writing the content
  • Pick Type by weight: Note for background, Tip for shortcuts, Important only for things readers must act on. Overusing Important dulls it.
  • Leave Label blank to use the type name, or replace it with something specific like "Deadline".
  • Keep the Message to a few sentences; the block hides entirely if both Title and Message are empty.
  • Set Width to Text column inside articles and Wide when it sits among full-width sections.
Accessibility
  • The box has role="note" and is named by its label, so screen readers identify it as a note distinct from the main text.
  • The type is always spelled out in text, not only shown by color or icon (WCAG 1.4.1); icons and the side rule are aria-hidden.
  • Links stay underlined in every type, and the Important type switches to a white focus outline against its dark background.
Customizing the code
  • Each type's colors and icon path live in the variants object; the Important box is bg-indigo-950.
  • Widths are max-w-3xl for Text column and max-w-7xl for Wide.

Editor fields

What content editors see in the P1 sidebar when they select this block.

  • Typeradio
  • Labeltext
  • Titletext
  • Messagetextarea
  • Link texttext
  • Linktext
  • Widthradio