Calloutv0.2.5Ready for Production
Contextual highlight block for alerts, tips, and status messages — two variants, seven semantic colors.
Prefer AI-assisted development?
Use Callout to surface important messages inline with content — system feedback, warnings, or guidance — without requiring user action. Built on Radix Slot with cva variants so color and emphasis adapt to semantic context out of the box.
This is the Default Callout
Installation
npm install @pmi/catalyst-calloutimport { CalloutRoot, CalloutIcon, CalloutText } from '@pmi/catalyst-callout';Variants
Callout supports two visual styles, each available in seven semantic colors.
Solid
High-contrast filled background with inverted text. Use for critical or high-priority messages that need immediate visual weight.
Off-black
The default Callout color — rendered when no color prop is set. Use for high-emphasis messages that don't fit semantic categories.
This is a solid off-black callout — the default color.
Accent
This is a solid accent callout.
Neutral
This is a solid neutral callout.
Info
This is a solid info callout.
Danger
This is a solid danger callout.
Warning
This is a solid warning callout.
Success
This is a solid success callout.
Outline
Subtle bordered container with semantic text color. Use for lower-priority contextual information that should not compete visually with surrounding content.
Off-black
This is an outline off-black callout — the default color.
Accent
This is an outline accent callout.
Neutral
This is an outline neutral callout.
Info
This is an outline info callout.
Danger
This is an outline danger callout.
Warning
This is an outline warning callout.
Success
This is an outline success callout.
Common Patterns
As Child
Use asChild to render the callout as a different HTML element while preserving all styling.
Syncing your data — this may take a moment.
API Reference
CalloutRoot
Prop
Type
Extends
React.HTMLAttributes<HTMLDivElement>— supportsrole,aria-live,aria-label, and all standard div attributes.
CalloutIcon
Prop
Type
Extends
React.HTMLAttributes<HTMLDivElement>. Addaria-hidden="true"when the adjacentCalloutTextalready conveys the meaning.
CalloutText
Prop
Type
Extends
React.HTMLAttributes<HTMLParagraphElement>.
Accessibility
Keyboard interactions
Callout is a static, non-interactive component — it has no interactive controls and adds no keyboard interactions of its own. If you place links inside CalloutText, standard browser focus behaviour applies. Place buttons as siblings within CalloutRoot rather than inside CalloutText, since CalloutText renders a <p> element and nesting a <button> inside a <p> is invalid HTML.
ARIA attributes
- Color is never the sole indicator — always pair color with an icon, descriptive text, or both.
- Add
role="alert"onCalloutRootfor urgent messages that must be announced immediately by screen readers. - Add
role="status"+aria-live="polite"for non-urgent status updates (e.g. "Changes saved"). - Use
aria-hidden="true"onCalloutIconwhen the adjacentCalloutTextfully conveys the meaning. If the icon carries unique meaning not covered by text, expose it via a visually hidden<span>insideCalloutTextrather thanaria-labelon the icon wrapper. - All color combinations meet WCAG 2.2 AA 4.5:1 contrast ratio for normal text.
See the WCAG 2.2 — Status Messages (4.1.3) and the APG Alert Pattern for inherited behaviour.
Choosing the Right Component
Use Callout when you need to surface a contextual, inline message that is always visible — no user action required. Reach for a different primitive when:
| If you need… | Use instead |
|---|---|
| A dismissible notification the user can close | Alert |
| A temporary message that auto-dismisses after a timeout | Toast |
| A persistent site-wide announcement bar | Banner |
| A small inline status label next to text or in a table | Badge |
| Contextual help triggered on demand (hover/focus) | Tooltip |
Related
Banner
A non-interactive component for displaying static status information to users. Similar to Alert, but without user actions.
CoachMark
An interactive guided tour component for product onboarding with full custom styling support. Built on react-joyride with customizable tooltips, 13 placement options, and CVA theming capabilities.