Installation
Usage
Components
Callout
The container component that provides the variant styling and structure.Sets the visual style and semantic meaning:
neutral: General informationwarning: Cautionary informationerror: Error or problem informationsuccess: Success or positive informationnew: New features or announcements
Content to display inside the callout. Typically includes CalloutHeading and CalloutText components.
Callback function when the dismiss button is clicked. When provided, adds a close button.
Accessible label for the callout icon. Defaults based on variant:
(information)for neutral(warning)for warning(error)for error(success)for success(new)for new
Accessible label for the dismiss button. Only used when
onDismiss is provided.Sets vertical margin spacing around the callout.
Overrides the default element name for customization.
CalloutHeading
A heading component for the callout title.The HTML heading level to render.
The heading text content.
CalloutText
A text component for callout body content.The text content.
CalloutList
A list component for displaying items within a callout.The HTML list type to render.
List items to display.
Examples
Basic Callout
Success Callout
Warning Callout
Callout with List
Dismissible Callout
Callout with Links
Accessibility
- Each variant includes an appropriate icon with a screen reader label
- The dismiss button includes accessible labeling
- Color is not the only indicator - icons provide additional context
- Callouts maintain sufficient color contrast for readability
- Content within callouts follows standard heading hierarchy
Best Practices
- Use callouts to highlight information that’s important but not critical
- Place callouts near the relevant content they reference
- Use the appropriate variant to match the information type
- Keep callout content concise and scannable
- Use CalloutHeading to provide clear context
- For critical, time-sensitive information, use Alert instead
- Only make callouts dismissible if they’re informational (not warnings or errors)
- Use CalloutList for multiple related items
- Avoid nesting callouts or using too many on a single page