Bootstrap 5 Callout
A Callout is a styled block element used to draw attention to important information, warnings, tips, or notices within page content. Unlike alerts, callouts are typically non-dismissible and are embedded inline with editorial content rather than triggered by user actions. Use them when you need to surface critical context, caveats, or supplementary details without interrupting the reading flow.
Primary Class
.calloutCommon Use Cases
- →Highlighting a deprecation warning inside API or developer documentation so readers don't miss breaking changes
- →Surfacing a billing caveat on a pricing page — for example, noting that annual plans are non-refundable after 30 days
- →Calling out a prerequisite step in a tutorial, such as requiring Node.js 18+ before running an install command
- →Drawing attention to a legal or compliance note in a terms-of-service or data privacy section without using a full modal
Variants & Classes
| Variant | Description |
|---|---|
| Callout Default | Standard callout with Bootstrap's default styling. |
| Callout Responsive | Responsive variant that adapts to different screen sizes. |
Code Example
<div class="callout callout-warning"> <h5 class="callout-heading">Before you upgrade</h5> <p>Upgrading from v2 to v3 requires a database migration. Back up your data and run <code>php artisan migrate</code> before deploying the new release. Skipping this step will result in data loss.</p> </div> <div class="callout callout-info mt-4"> <h5 class="callout-heading">API rate limits</h5> <p>Free-tier accounts are limited to 100 requests per minute. If you exceed this limit, the API returns a <code>429 Too Many Requests</code> response. Upgrade to a paid plan for higher limits.</p> </div>
Live Examples
Basic Callout
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 consistently
Reserve callout-danger for genuine errors or destructive actions, callout-warning for things users might overlook to their detriment, and callout-info for neutral supplementary context — mixing these arbitrarily trains users to ignore them.
Keep callout headings scannable
Use an <h5> heading that states the consequence or action — 'Back up first', 'Rate limits apply' — rather than a vague label like 'Note' or 'Important', so users scanning the page understand the callout's relevance instantly.
Avoid stacking multiple callouts back-to-back
If you have three or more consecutive callouts, consolidate them into a structured list or table — consecutive callouts lose emphasis and create visual noise that causes readers to skip them entirely.
Pair left-border callouts with the correct Bootstrap border utility
For a left-accent style common in documentation sites, combine border-start border-4 with a contextual border colour class like border-warning and ps-3 — this avoids writing custom CSS while staying on-brand.