50% OFF Join Waitlist
Status message that displays contextual feedback or notifications.
package showcase import ( "github.com/axzilla/templui/internal/components/alert" "github.com/axzilla/templui/internal/components/icon" ) templ AlertDefault() { <div class="w-full max-w-xl"> @alert.Alert() { @icon.Rocket(icon.Props{Size: 16}) @alert.Title() { Note } @alert.Description() { This is a default alert — check it out! } } </div> }
templui add alert
Destructive
package showcase import ( "github.com/axzilla/templui/internal/components/alert" "github.com/axzilla/templui/internal/components/icon" ) templ AlertDestructive() { <div class="w-full max-w-xl"> @alert.Alert(alert.Props{Variant: alert.VariantDestructive}) { @icon.TriangleAlert(icon.Props{Size: 16}) @alert.Title() { Error } @alert.Description() { Your session has expired. Please log in again. } } </div> }