✦ A decade of Canvas craft, now driven by AI — describe it, watch it build live.Start building
Bootstrap 5Content

Bootstrap 5 Callout

A Callout is a styled block used to highlight important information that stands apart from the main body text — think warnings, tips, notes, or contextual alerts within documentation or article content. Unlike a dismissible Alert, a Callout is a static, non-interactive element meant to stay visible and add editorial emphasis. Use it when a piece of content needs to catch the reader's eye without interrupting the page flow with a modal or toast.

Primary Class

.callout

Common Use Cases

  • Documentation pages flagging deprecated API methods with a 'Breaking Change' callout so developers don't miss critical upgrade notes
  • Tutorial articles using a 'Pro Tip' callout to surface an advanced technique inline without burying it in a footnote
  • Legal or compliance pages using a 'Required' callout to draw attention to mandatory steps in a multi-step process
  • SaaS onboarding flows using an 'Info' callout inside a settings panel to explain why a particular field is locked to the account admin

Variants & Classes

VariantDescription
Callout DefaultStandard callout with Bootstrap's default styling.
Callout ResponsiveResponsive variant that adapts to different screen sizes.

Code Example

<div class="callout callout-warning">
  <h5 class="callout-heading">Breaking Change in v3.0</h5>
  <p class="mb-0">The <code>getUserData()</code> method has been removed. Use <code>fetchUser(id)</code> instead. See the <a href="/migration-guide">migration guide</a> for full details.</p>
</div>

<div class="callout callout-info mt-4">
  <h5 class="callout-heading">Pro Tip</h5>
  <p class="mb-0">You can chain multiple <code>filter()</code> calls before calling <code>render()</code> — the pipeline only executes once, keeping performance predictable at scale.</p>
</div>

Live Examples

Basic Callout

Example 1

Canvas Framework Variants

The Canvas template extends Bootstrap 5 with 1,658+ component variants. Generate any of these using Canvas Builder:

  • Canvas Builder generated callout with custom colours
  • Callout with interactive states
  • Responsive callout for all screen sizes

Best Practices

Use semantic colour variants, not just visual ones

Match the callout variant to the actual meaning — use `callout-danger` for destructive actions, `callout-warning` for recoverable issues, and `callout-info` for neutral context. Misusing colour trains users to ignore the distinction, which defeats the purpose.

Keep callout headings short and front-loaded

Write headings like 'Required Step' or 'Known Limitation' — not 'Please Note the Following'. Screen readers and skimmers hit the heading first; it should communicate the type of callout before the body text is even read.

Avoid nesting callouts inside other callouts

Nested callouts create visual noise and signal a structural problem in your content hierarchy. If you feel the need to nest, split the content into separate sections or use a list inside a single callout instead.

Add a left-border accent via a utility or custom class for extra visual weight

Bootstrap 5 doesn't ship a native Callout component, so pair `border-start border-4 border-warning` with `bg-warning bg-opacity-10 p-3 rounded` to create a clean, accessible callout using only utility classes without writing custom CSS.

FAQ

Bootstrap 5 doesn't have a built-in Callout — how is it actually implemented?
Correct — Bootstrap 5 removed the native Callout from its core component set (it existed in Bootstrap's own docs as a custom style). In practice, Callouts are built by combining existing Bootstrap utilities: a coloured left border (`border-start border-4`), a background tint (`bg-info bg-opacity-10`), padding (`p-3 p-md-4`), and border-radius (`rounded`). The Canvas HTML template ships with pre-built `.callout`, `.callout-info`, `.callout-warning`, `.callout-danger`, and `.callout-success` classes so you don't need to reconstruct this each time.
How do I customise the callout's accent colour to match my brand?
If you're using the Canvas template, override the SCSS variables `$callout-border-color`, or target the specific variant class like `.callout-info { border-color: #your-brand-hex; background-color: rgba(your-rgb, 0.08); }`. For pure utility-class approaches in Bootstrap 5, swap `border-warning` for any of the contextual border utilities or define a custom CSS property in your `:root` block and apply it with an inline style or custom class. Avoid hardcoding hex values directly into the HTML — use CSS custom properties so the colour updates globally when your brand palette changes.
How does CanvasBuilder generate Callout components?
When you describe a callout in your CanvasBuilder prompt — for example, 'add a warning callout about API rate limits' — the AI outputs the full HTML block using the Canvas template's pre-defined `.callout-warning` class, populated with your actual content. It applies the correct heading level based on surrounding document structure and ensures the component is wrapped in a semantically appropriate container, producing clean, copy-paste-ready code that requires zero post-generation cleanup.