Callout
Callouts display important messages inline with surrounding content. Use them to highlight tips, warnings, errors, or other information users should not miss.
Examples
Variant
Set the variant attribute to match the callout to its message.
Try it from Settings whenever you're ready.
You can safely close this tab now.
Changes take effect on your next login.
Save your work to avoid losing it.
Deleting a project removes it for everyone on the team.
Appearance
Use the appearance attribute to change the callout's visual style. With no appearance set, a callout renders with a quiet fill and border, matching filled-outlined.
Size
Use the size attribute to change a callout's size.
Without an Icon
Icons are optional. Omit the icon slot for a text-only callout.
Customizing
Style a callout with regular CSS — background, border, border-radius, color, padding, and margin all work as expected.
API
Importing
If you're using the autoloader or a hosted project, components load on demand — no manual import needed. To cherry-pick a component manually, use one of the following snippets.
Import this component directly from the CDN:
import 'https://ka-f.webawesome.com/[email protected]/components/callout/callout.js';
After installing Web Awesome via npm, import this component:
import '@awesome.me/webawesome/dist/components/callout/callout.js';
If you're self-hosting Web Awesome, import this component from your server:
import './webawesome/dist/components/callout/callout.js';
To import this component for React 18 or below, use the following code:
import WaCallout from '@awesome.me/webawesome/dist/react/callout/index.js';
Slots
Learn more about using slots.
| Name | Description |
|---|---|
| (default) | The callout's main content. |
icon
|
An icon to show in the callout. Works best with <wa-icon>. |
Attributes & Properties
Learn more about attributes and properties.
| Name | Description | Reflects |
|---|---|---|
appearanceappearance |
The callout's visual appearance.
Type
'accent' | 'filled' | 'outlined' | 'plain' | 'filled-outlined'
|
|
sizesize |
The callout's size.
Type
'xs' | 's' | 'm' | 'l' | 'xl' | 'small' | 'medium' | 'large'
Default
'm'
|
|
variantvariant |
The callout's theme variant. Defaults to
brand if not within another element with a variant.
Type
'brand' | 'neutral' | 'success' | 'warning' | 'danger'
Default
'brand'
|
|
CSS Parts
Learn more about CSS parts.
| Name | Description | CSS selector |
|---|---|---|
icon |
The container that wraps the optional icon. |
::part(icon)
|
message |
The container that wraps the callout's main content. |
::part(message)
|