Callout
High-visibility information container panel built with panel radius (--radius-panel) and semantic colors.
// Plain markup
import { Callout } from "@shavin/ui";Tones (default icon)
This tracker is visible to everyone you've shared it with.
Payment recorded — this item is now marked done for the month.
This item is due in 2 days and has no reminder set.
Deleting this tracker permanently removes its history. This can't be undone.
Component Source
<Callout color="brand">This tracker is visible to everyone you've shared it with.</Callout>
<Callout color="success">Payment recorded — this item is now marked done for the month.</Callout>
<Callout color="warning">This item is due in 2 days and has no reminder set.</Callout>
<Callout color="danger">Deleting this tracker permanently removes its history. This can't be undone.</Callout>Custom icon
Enable notifications to get reminded before this bill is due.
Component Source
<Callout color="warning" icon={<Icon name="bell" />}>
Enable notifications to get reminded before this bill is due.
</Callout>No icon
A plain tinted note with no icon slot.
Component Source
<Callout color="brand" icon={null}>
A plain tinted note with no icon slot.
</Callout>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | — | Title text header for callout. |
| titleAs | "p" | "h2" | "h3" | "h4" | "h5" | "h6" | `p`: | Element for the title. Default `p`: a callout title labels a note, it does not open a section. Use a heading level that fits the page outline when it should be navigable. |
| icon | React.ReactNode | — | Custom icon node override. |
| role | React.AriaRole | `alert` | ARIA role. Default `alert` for `color="danger"` and `status` for the other colours. Pass `role="note"` for a static notice that is on the page from the first load. |
| color | "neutral" | "brand" | "success" | "warning" | "danger" | "neutral" | — |