Alerts
Contextual feedback messages for user actions, status updates, and system notifications.
Basic Alerts
Four standard alert variants for different levels of feedback. Each includes an icon, title, and message for clear communication.
Routine server maintenance is scheduled for Saturday at 2:00 AM UTC. Expect brief downtime.
<div class="hu-alert hu-alert-info">
<svg class="hu-alert-icon" ...>...</svg>
<div class="hu-alert-content">
<div class="hu-alert-title">Scheduled Maintenance</div>
<p>Routine server maintenance is scheduled for Saturday.</p>
</div>
</div>
Your application has been successfully deployed to production.
<div class="hu-alert hu-alert-success">
<svg class="hu-alert-icon" ...>...</svg>
<div class="hu-alert-content">
<div class="hu-alert-title">Deployment Complete</div>
<p>Your application has been successfully deployed.</p>
</div>
</div>
Your server CPU usage has exceeded 90% for the last 15 minutes.
<div class="hu-alert hu-alert-warning">
<svg class="hu-alert-icon" ...>...</svg>
<div class="hu-alert-content">
<div class="hu-alert-title">Resource Usage High</div>
<p>Your server CPU usage has exceeded 90%.</p>
</div>
</div>
We were unable to process your payment. Please update your billing information.
<div class="hu-alert hu-alert-danger">
<svg class="hu-alert-icon" ...>...</svg>
<div class="hu-alert-content">
<div class="hu-alert-title">Payment Failed</div>
<p>We were unable to process your payment.</p>
</div>
</div>
Alert with Title
Use .hu-alert-title inside .hu-alert-content for a bold heading with a description underneath.
We've enabled edge caching on all plans. Your site can now serve content from 200+ global nodes for faster load times.
<div class="hu-alert hu-alert-info">
<svg class="hu-alert-icon" ...>...</svg>
<div class="hu-alert-content">
<div class="hu-alert-title">New Feature: Edge Caching</div>
<p>We've enabled edge caching on all plans.</p>
</div>
</div>
Dismissible Alerts
Add the .hu-alert-dismiss class with a close button to allow users to dismiss alerts.
Your server disk usage is at 85%. Consider upgrading or removing unused files.
<div class="hu-alert hu-alert-warning">
<svg class="hu-alert-icon" ...>...</svg>
<div class="hu-alert-content">
<div class="hu-alert-title">Disk Space Low</div>
<p>Your server disk usage is at 85%.</p>
</div>
<button class="hu-alert-dismiss" aria-label="Dismiss alert">
<svg ...>...</svg>
</button>
</div>
This is a dismissible info alert.
This is a dismissible success alert.
This is a dismissible warning alert.
This is a dismissible danger alert.
<div class="hu-alert hu-alert-info">
<svg class="hu-alert-icon" ...>...</svg>
<div class="hu-alert-content">
<p>This is a dismissible info alert.</p>
</div>
<button class="hu-alert-dismiss" aria-label="Dismiss alert">
<svg ...>...</svg>
</button>
</div>
Alert with Links
Use .hu-alert-link for styled inline links within alert messages.
Your domain example.com expires in 7 days. Renew now to keep it active.
SSL certificate for example.com has expired. Update certificate to restore HTTPS.
<div class="hu-alert hu-alert-info">
<svg class="hu-alert-icon" ...>...</svg>
<div class="hu-alert-content">
<p>Your domain expires in 7 days.
<a href="#" class="hu-alert-link">Renew now</a>.
</p>
</div>
</div>
Alert Variants
Alerts come in three visual styles: solid (default), outlined, and light. Use the base variant classes and add the outline or light modifier.
Solid info alert with default background fill.
Solid success alert with default background fill.
<div class="hu-alert hu-alert-info">...</div>
<div class="hu-alert hu-alert-success">...</div>
Outlined info alert with transparent background.
Outlined success alert with transparent background.
Outlined warning alert with transparent background.
Outlined danger alert with transparent background.
<div class="hu-alert hu-alert-info" style="background: transparent; border: 2px solid var(--hu-info);">
<svg class="hu-alert-icon" ...>...</svg>
<div class="hu-alert-content">
<p>Outlined info alert.</p>
</div>
</div>
Light info alert with subtle background.
Light success alert with subtle background.
Light warning alert with subtle background.
Light danger alert with subtle background.
<div class="hu-alert" style="background: var(--hu-info-lighter); border-color: var(--hu-info-light); color: var(--hu-info-dark);">
<svg class="hu-alert-icon" ...>...</svg>
<div class="hu-alert-content">
<p>Light info alert with subtle background.</p>
</div>
</div>
Real-World Examples
Real-world alert patterns commonly used in dashboards and admin panels and customer notifications.
Web server web-01.prod has been moved to maintenance mode. All requests are being served from the failover instance. View status page
<div class="hu-alert hu-alert-warning">
<svg class="hu-alert-icon" ...>...</svg>
<div class="hu-alert-content">
<div class="hu-alert-title">Server Status Change</div>
<p>Web server <strong>web-01.prod</strong> has been moved to maintenance mode.
<a href="#" class="hu-alert-link">View status page</a>
</p>
</div>
<button class="hu-alert-dismiss" aria-label="Dismiss alert">...</button>
</div>
The SSL certificate for *.example.com expires in 3 days. Renew immediately to avoid service disruption and browser warnings. Renew certificate
<div class="hu-alert hu-alert-danger">
<svg class="hu-alert-icon" ...>...</svg>
<div class="hu-alert-content">
<div class="hu-alert-title">SSL Certificate Expiring Soon</div>
<p>The SSL certificate for <strong>*.example.com</strong> expires in 3 days.
<a href="#" class="hu-alert-link">Renew certificate</a>
</p>
</div>
<button class="hu-alert-dismiss" aria-label="Dismiss alert">...</button>
</div>
Create staging environments from your production site with a single click. Test changes safely before going live. Learn more
<div class="hu-alert hu-alert-info">
<svg class="hu-alert-icon" ...>...</svg>
<div class="hu-alert-content">
<div class="hu-alert-title">Introducing: One-Click Staging</div>
<p>Create staging environments from your production site.
<a href="#" class="hu-alert-link">Learn more</a>
</p>
</div>
<button class="hu-alert-dismiss" aria-label="Dismiss alert">...</button>
</div>
Your site has been successfully migrated from starter to business plan. All features are now active. View plan details
<div class="hu-alert hu-alert-success">
<svg class="hu-alert-icon" ...>...</svg>
<div class="hu-alert-content">
<div class="hu-alert-title">Migration Complete</div>
<p>Your site has been successfully migrated from <strong>starter</strong> to <strong>business</strong> plan.
<a href="#" class="hu-alert-link">View plan details</a>
</p>
</div>
</div>
API Reference
Complete list of CSS classes available for alerts.
| Class | Description |
|---|---|
.hu-alert |
Base alert container with flex layout, border, and padding. |
.hu-alert-info |
Info variant with blue background and border. |
.hu-alert-success |
Success variant with green background and border. |
.hu-alert-warning |
Warning variant with amber background and border. |
.hu-alert-danger |
Danger variant with red background and border. |
.hu-alert-icon |
Icon container with fixed size and flex shrink. |
.hu-alert-content |
Content wrapper that fills remaining space. |
.hu-alert-title |
Bold heading text with bottom margin. |
.hu-alert-dismiss |
Dismiss button positioned absolute top-right. |
.hu-alert-link |
Styled inline link with underline and bold weight. |