Callout
Persistent inline notices for documentation-style content. A callout draws the same box as an alert, with the same padding, corners and tints, so a page that shows both shows one kind of notice. It adds an optional one-sided accent stripe via the stripe prop. Unlike alerts, callouts are not dismissible and are never announced; they convey persistent, contextual information.
Live Sandbox
This is a hydrated playground for the component. Toggle "Live preview" on the block below to swap the static HTML render for a real Livewire instance — every prop in the component's sandbox schema becomes an editable form field inside the iframe, so you can try different prop combinations live without writing any local code.
Basic Usage
With Title
Give it a bold heading with the title prop, or with the title slot when the heading carries markup:
A title in the page's outline
The title is drawn as a heading and is not one for a screen reader until you give it a level, 1 to 6. With
level, it is a heading of that level in the callout's own size, so a reader moving from heading to heading
finds it, and the headings in the callout's text count from it:
Sizes
Without level the title stays out of the outline, which suits a note whose title only labels it.
Variants
Six semantic intents control color, icon and background tint. primary takes the accent color, and the other five follow:
/v1/orders to /v2/orders. Requests to the old address fail from June 1.With Actions
Use the actions slot for buttons or links below the body text:
Without Border
Set bordered to false for a cleaner, borderless look; the background tint carries the surface:
/v1/orders to /v2/orders.Accent Stripe (opt-in)
Add a one-sided accent bar with the stripe prop. It is off by default: a plain callout is the alert-style 4-sided tinted border, so the stripe is there when you want extra emphasis rather than on every notice. Combine stripe with :bordered="false" for a bar-only notice.
Without Icon
Hide the default icon:
Callout vs Alert
| Feature | Callout | Alert |
|---|---|---|
| Purpose | Inline documentation, persistent notices | Transient feedback, dismissible messages |
| Dismissible | No | Yes (optional) |
| Box | Same padding, corners and tints | Same padding, corners and tints |
| Announced | Never: it stands with the page | When a render adds it |
| Element | <div> |
<div> |
| Typical use | Documentation tips, deprecation notices, feature announcements | Form errors, success confirmations, warnings |
Width & Layout
Callouts are block-level elements that fill their parent width. Control the width with Tailwind classes directly on the component:
<x-wirekit::callout class="max-w-lg" intent="info" title="Tip">
Keep callouts short and actionable.
</x-wirekit::callout>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant |
string |
'info' |
primary | info | success | warning | danger | neutral. info tints with --color-wk-info-tone, which looks like primary until you give info a color of its own. See Variants & Intents for the cross-component reference. |
intent |
string|null |
null |
Canonical name for the color axis — the same spelling Button and Badge use. Falls back to variant when omitted, and wins over it when both are given. |
icon |
bool |
true |
Show the intent icon |
bordered |
bool |
true |
Show the surrounding 4-sided border |
stripe |
bool |
false |
Show an opt-in one-sided accent bar (off by default) |
animateIn |
string|null | null |
Entrance-reveal preset (e.g. 'fade', 'slide-up', 'scale-in') — inline alternative to wrapping in <x-wirekit::reveal>. See Animations for the full preset list. Respects prefers-reduced-motion: reduce. |
title |
string|null |
null |
The heading above the body. The title slot takes the same place and wins when both are given — use it when the heading carries markup |
level |
int|null |
null |
Makes the title a heading of this level, 1 to 6, in the callout's own size. Null keeps it a div, out of the page's outline. See A title in the page's outline |
scope |
string |
null |
Scoped personalization key |
Slots
| Slot | Description |
|---|---|
| Default | Body text content |
title |
Bold heading above the body, when it carries markup. A plain heading can be the title prop |
actions |
Action buttons/links below the body |
iconSlot |
Custom icon that overrides the intent-derived default icon |
Accessibility
-
Rendered as a plain
<div>: no landmark, and no live region.A landmark would be wrong twice over.
complementaryis reserved for a self-contained section significant to the page, and a note in the flow of the text is not that — and a page usually already has one in its sidebar, so a second with no distinguishing name is an accessibility failure that gets reported against the sidebar rather than against the callout.A live region (
role="status",role="alert") would be wrong for the opposite reason. This component is persistent content that is already present when the page loads, so a live region says nothing at that moment — and then re-announces the entire callout every time the element re-renders, though nothing about it changed. For content that genuinely arrives and asks for attention, use Alert. -
The title is a heading of its
levelwhen one is given, and adivwithout it. -
Decorative icons are
aria-hidden="true". -
The opt-in accent stripe, when shown, is
aria-hidden="true". -
No interactive elements require keyboard handling (callouts are static).
Keyboard Interaction
This component is purely presentational and does not respond to keyboard input.
Pitfalls
- Don't use a callout for a message that arrives after the page has loaded. A callout is no live region, so a screen reader does not hear it appear. The result of a save, an error or anything else that answers what the reader just did belongs in an alert. A callout holds what is true when the page opens, however short it is.
Design Tokens
| Token | Usage |
|---|---|
--color-wk-accent |
Primary intent color |
--color-wk-info-tone / --color-wk-info-text |
Info intent tint / icon |
--color-wk-success / --color-wk-success-text |
Success intent tint / icon |
--color-wk-warning / --color-wk-warning-text |
Warning intent tint / icon |
--color-wk-danger |
Danger intent |
--padding-wk-x-md |
Callout padding, the same on every side, as on an alert |
--radius-wk-md |
Corner radius, as on an alert |
--border-wk-width |
Border width |
--font-wk-sans |
Font family |
--font-wk-heading-weight |
Title weight |
Usage & Conventions
Prop conventions — this component uses one or more of the shared semantic prop names (
intent/variant/tone/surface). See Prop naming conventions for the canonical vocabulary, alias matrix, and decision tree.