Callouts are used to highlight important information, alerts, or system statuses.
Usage
import { Callout } from '@console/nimbus-ui/core';Examples
Semantic Intents
Use the intent prop to communicate the semantic meaning of the callout.
Available intents are neutral, info, success, warning, danger, and special.
Changing the intent automatically updates the background, border, text, and default icon.
Variants
Use the variant prop to change the structural appearance of the callout.
The enclosed variant (default) features a full bounding border and a thick accent strip.
The subtle variant removes the border, relying solely on background color and spacing for grouping.
Custom Icons
While <Callout.Icon /> automatically renders a semantic icon based on the intent,
you can override it by passing a custom SVG or component as a child.
You are able to also provide a custom color directly to the icon if required.
You can also omit <Callout.Icon> entirely if you need to use a larger, custom-sized brand icon.
Brand Icons
Instead of using <Custom.Icon> it's better to use brand icons directly.
This will prevent fills from being applied incorrectly.
API
Callout
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | |
| data-rac-id | string | — | |
| data-testid | string | — | |
| intent | enum | — | |
| variant | enum | — |
Callout.Icon
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — |
Callout.Content
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — |
Callout.Title
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — |
Callout.Description
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — |
Callout.Button
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | enum | primary | Only allows specific visual variants that are compliant with Callout intents. |
Figma