Callout
Persistent inline notices for documentation-style content. Callouts are visually denser than Alerts (a stronger background tint), with an optional one-sided accent stripe via the stripe prop. Unlike alerts, callouts are not dismissible; 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
Use the title slot for a bold heading:
Variants
Five semantic variants control color, icon, and background tint:
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:
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.
stripe prop to add a one-sided accent bar.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) |
| Visual weight | Heavier (larger padding, denser tint) | Lighter |
| Background tint | 15% | 10% |
| 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" variant="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. primary is a visual synonym of info. 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 variant 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 docs/animations.md for the full preset list. Respects prefers-reduced-motion: reduce. |
scope |
string |
null |
Scoped personalization key |
Slots
| Slot | Description |
|---|---|
| Default | Body text content |
title |
Bold heading above the body |
actions |
Action buttons/links below the body |
iconSlot |
Custom icon that overrides the variant-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. -
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 single sentence —
<x-wirekit::alert>is the right tool. Callouts are for multi-paragraph context that lives in flow with the page; alerts are for state announcements that interrupt.
Design Tokens
| Token | Usage |
|---|---|
--color-wk-accent |
Info variant color |
--color-wk-success |
Success variant |
--color-wk-warning |
Warning variant |
--color-wk-danger |
Danger variant |
--padding-wk-x-lg / --padding-wk-y-lg |
Callout padding |
--radius-wk-lg |
Corner radius |
--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.