Alert
Inline status message with semantic colors, optional icon, title, subtitle, and dismiss.
Basic
Colors
With title
Profile updated
Review required
Payment failed
With title and subtitle
Set subtitle to render a short context tag inline next to the title, like a code, category, or timestamp.
Scheduled maintenance
2:00 AM UTC
Trial ending
3 days left
Build failed
exit 137
Custom icon
Pass an :icon slot to replace the default status glyph. Match the default size-5 bounding box to keep alerts aligned.
What's new
Pro tip
3 new notifications
Hide icon
Set hide_icon to drop the leading glyph when the color and title already convey meaning.
Tip
Persistent (no close)
Use hide_close for permanent banners or alerts replaced by a server-driven render.
Read-only mode
Region degraded
With action buttons
The default slot accepts arbitrary HEEx, so you can render buttons or links beneath the body.
Unsaved changes
Session expiring
Server-side dismissal
Pass a Phoenix.LiveView.JS command to on_close. Your push runs first, then the built-in 200ms fade-and-scale animation hides the alert.
What's new
Full-width banner
Drop the rounded corners and side borders with class so the alert spans the layout edge to edge.
Form error summary
Top-of-form summary that pairs danger with hide_close so the user must address the listed errors.
We couldn't save your changes
- Email is required.
- Password must be at least 8 characters.
- Display name cannot be blank.