INLINE NOTIFICATION: Page-level notifications for system status, warnings, errors, successes, and highlights
VARIANTS: info | warning | error | success | highlight
CLASSES: .tw-inline-notification | .tw-inline-notification-{variant} | .tw-inline-notification-icon | .tw-inline-notification-content | .tw-inline-notification-title | .tw-inline-notification-message | .tw-inline-notification-actions | .tw-inline-notification-close
In-flow notifications that live within the page content. Unlike floating notifications (toast-style, fixed position),
inline notifications persist until explicitly dismissed or are permanently visible. Supports optional icon, title,
message, action buttons, and close button. Requires inline_notification_controller.js for dismiss behavior.
Variants: Five semantic variants for different notification types. Each shown here with
icon, title, message, action buttons, and close button. Use .tw-inline-notification-{variant} to set the color scheme.
New admissions cycle is now open
Application deadline approaching
Failed to import applicant data
All applications processed
New feature: Automated waitlist management
<div class="tw-inline-notification tw-inline-notification-info" role="status">
<div class="tw-inline-notification-icon"><i class="fa-solid fa-circle-info"></i></div>
<div class="tw-inline-notification-content">
<p class="tw-inline-notification-title">Title</p>
<p class="tw-inline-notification-message">Message</p>
<div class="tw-inline-notification-actions">
<button class="tw-btn tw-btn-sm tw-btn-secondary">Action</button>
</div>
</div>
<button class="tw-inline-notification-close" aria-label="Close notification">
<i class="fa-solid fa-xmark"></i>
</button>
</div>
Title Only: The simplest notification — just a title with an icon and close button. Useful for brief, one-line messages that need no further explanation.
The admissions portal is scheduled for maintenance tonight at 10pm.
Your session will expire in 5 minutes.
Changes saved successfully.
<div class="tw-inline-notification tw-inline-notification-info" role="status">
<div class="tw-inline-notification-icon"><i class="fa-solid fa-circle-info"></i></div>
<div class="tw-inline-notification-content">
<p class="tw-inline-notification-title">Title text only</p>
</div>
<button class="tw-inline-notification-close" ...><i class="fa-solid fa-xmark"></i></button>
</div>
Message Only: A notification with just body text and no title. Useful for simple informational messages that don't need a heading.
<div class="tw-inline-notification tw-inline-notification-info">
<div class="tw-inline-notification-icon"><i class="fa-solid fa-circle-info"></i></div>
<div class="tw-inline-notification-content">
<p class="tw-inline-notification-message">Message text only</p>
</div>
<button class="tw-inline-notification-close" ...><i class="fa-solid fa-xmark"></i></button>
</div>
No Icon: The icon element is optional. Omit .tw-inline-notification-icon
for a cleaner, text-only layout.
System update scheduled
Incomplete application
<div class="tw-inline-notification tw-inline-notification-info">
<div class="tw-inline-notification-content">
<p class="tw-inline-notification-title">Title</p>
<p class="tw-inline-notification-message">Message</p>
</div>
<button class="tw-inline-notification-close" ...><i class="fa-solid fa-xmark"></i></button>
</div>
No Actions: Notifications can omit the action buttons area. This is the most common pattern — just informational content with a close button.
Multiple entry points available
Bulk import complete
<div class="tw-inline-notification tw-inline-notification-info">
<div class="tw-inline-notification-icon"><i class="fa-solid fa-circle-info"></i></div>
<div class="tw-inline-notification-content">
<p class="tw-inline-notification-title">Title</p>
<p class="tw-inline-notification-message">Message</p>
</div>
<button class="tw-inline-notification-close" ...><i class="fa-solid fa-xmark"></i></button>
</div>
Non-Dismissible: Omit the close button and the Stimulus controller to create a notification that is always visible. These are useful for persistent system messages.
Read-only mode
Account suspended
Welcome to Admissions+
<div class="tw-inline-notification tw-inline-notification-warning" role="alert">
<div class="tw-inline-notification-icon"><i class="fa-solid fa-triangle-exclamation"></i></div>
<div class="tw-inline-notification-content">
<p class="tw-inline-notification-title">Title</p>
<p class="tw-inline-notification-message">Message</p>
</div>
</div>
data-controller, no dismiss action.
Rich Content: The message area supports rich HTML content including lists, links, and structured text. This is useful for detailed error reports or feature explanations.
Incompatible form fields detected
What's new in this release
<div> instead of <p> for
.tw-inline-notification-message when the content includes block-level elements like lists.
Stacked: Multiple inline notifications stack vertically with space-y-3 spacing.
This is the natural layout when multiple notifications appear in sequence within a page.
Payment processing failed
Missing supporting documents
Application reference: APP-2026-0847
<div class="tw:space-y-3">
<div class="tw-inline-notification tw-inline-notification-error">...</div>
<div class="tw-inline-notification tw-inline-notification-warning">...</div>
<div class="tw-inline-notification tw-inline-notification-info">...</div>
</div>
Live: These notifications use data-controller="inline-notification"
for real dismiss behavior. Click the close button or press Escape (when focused within) to dismiss.
The notification fades out and is removed from the DOM.
Try dismissing this notification
Dismiss via action button
This one disappears too
<div class="tw-inline-notification tw-inline-notification-info"
data-controller="inline-notification"
data-action="keydown.escape->inline-notification#dismiss"
role="status">
<div class="tw-inline-notification-icon"><i class="fa-solid fa-circle-info"></i></div>
<div class="tw-inline-notification-content">...</div>
<button class="tw-inline-notification-close"
data-action="click->inline-notification#dismiss"
aria-label="Close notification">
<i class="fa-solid fa-xmark"></i>
</button>
</div>
The in-card banner size: tighter padding and body-xs text, for a notification that
lives inside another component — an offer-status line in a person card, a warning in a
drawer panel — where the page-level size would dominate the card it sits in.
Distinct from .tw-inline-notification-compact, which only reduces vertical padding
for one-line inline-action rows. Colour variants and the dismiss button work unchanged.
Year 7 · September 2027 intake
Offer expires on Friday 21 August
Place accepted
<div class="tw-inline-notification tw-inline-notification-sm tw-inline-notification-warning">…</div>
PARTS: .tw-inline-notification-collapsible | -toggle | -chevron | -body
A one-line summary bar that expands to the detail behind it — "12 updates since your last visit".
The whole bar is one real <button class="tw-inline-notification-toggle"> carrying
aria-expanded and aria-controls; the detail region is a
.tw-collapsible-content with data-collapsible-target="content", wired by
data-controller="collapsible" and data-action="click->collapsible#toggle".
The chevron rotates from [aria-expanded="true"] in CSS, so do not also give it
data-collapsible-target="icon" — the controller would rotate it a second time and it
would point back the way it started. Start open with
data-collapsible-open-value="true", aria-expanded="true" and
.tw-show on the content.
Wrap the body in a tw:overflow-hidden div — the rule from
docs/components/collapsible.md: the collapse animates a grid row from 0fr,
and the direct child must clip, or the grid item's automatic minimum size keeps the "closed" bar
permanently open. The wrapper goes outside .tw-inline-notification-body, so the
body's own padding is clipped with it.
<div class="tw-inline-notification tw-inline-notification-warning tw-inline-notification-collapsible" data-controller="collapsible">
<button class="tw-inline-notification-toggle" type="button" aria-expanded="false" aria-controls="…" data-action="click->collapsible#toggle">
<i class="tw-inline-notification-icon fa-solid fa-bell" aria-hidden="true"></i>
<span class="tw-inline-notification-title tw:mb-0">12 updates since your last visit</span>
<i class="tw-inline-notification-chevron fa-solid fa-chevron-down" aria-hidden="true"></i>
</button>
<div class="tw-collapsible-content" id="…" data-collapsible-target="content">
<div class="tw:overflow-hidden"><div class="tw-inline-notification-body">…detail…</div></div>
</div>
</div>