Browse Components
Alert
Persistent messages, inline or across a page.
Basic
A persistent message within the page layout.
The workspace will be unavailable on Sunday from 02:00 to 03:00 UTC.
View Code
<div class="alert" data-tone="info">
<svg
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.75"
stroke-linecap="round"
stroke-linejoin="round"
class="icon alert-icon"
aria-hidden="true"
focusable="false"
>
<circle cx="12" cy="12" r="9">
</circle>
<path d="M12 11v6m0-10v.1">
</path>
</svg>
<div class="alert-content">
<strong class="alert-title">
Scheduled maintenance
</strong>
<p>
The workspace will be unavailable on Sunday from 02:00 to 03:00 UTC.
</p>
</div>
</div>Inline message
Keep a short message and action together; actions wrap below on small screens.
View Code
<div class="alert alert-inline" data-tone="info">
<svg
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.75"
stroke-linecap="round"
stroke-linejoin="round"
class="icon alert-icon"
aria-hidden="true"
focusable="false"
>
<circle cx="12" cy="12" r="9">
</circle>
<path d="M12 11v6m0-10v.1">
</path>
</svg>
<div class="alert-content">
<p class="alert-message">
A new workspace version is available.
</p>
<div class="alert-actions">
<a class="btn secondary btn-sm" href="/docs">
Read the Guide
</a>
</div>
</div>
<button
class="btn ghost btn-icon alert-dismiss"
type="button"
data-alert-dismiss
aria-label="Dismiss Message"
hidden
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.75"
stroke-linecap="round"
stroke-linejoin="round"
class="icon"
aria-hidden="true"
focusable="false"
>
<path d="m6 6 12 12M18 6 6 18">
</path>
</svg>
</button>
</div>Status messages
Use a clear message and icon as well as color.
A new workspace version is ready.
Your preferences have been updated.
Remove unused files before uploading more.
Check your connection and try again.
View Code
<div class="stack">
<div class="alert" data-tone="info">
<svg
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.75"
stroke-linecap="round"
stroke-linejoin="round"
class="icon alert-icon"
aria-hidden="true"
focusable="false"
>
<circle cx="12" cy="12" r="9">
</circle>
<path d="M12 11v6m0-10v.1">
</path>
</svg>
<div class="alert-content">
<strong class="alert-title">
Update available
</strong>
<p>
A new workspace version is ready.
</p>
</div>
</div>
<div class="alert" data-tone="success">
<svg
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.75"
stroke-linecap="round"
stroke-linejoin="round"
class="icon alert-icon"
aria-hidden="true"
focusable="false"
>
<circle cx="12" cy="12" r="9">
</circle>
<path d="m7 12 3 3 7-7">
</path>
</svg>
<div class="alert-content">
<strong class="alert-title">
Changes saved
</strong>
<p>
Your preferences have been updated.
</p>
</div>
</div>
<div class="alert" data-tone="warning">
<svg
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.75"
stroke-linecap="round"
stroke-linejoin="round"
class="icon alert-icon"
aria-hidden="true"
focusable="false"
>
<path d="M10 5q2-3 4 0l7 13q2 3-2 3H5q-4 0-2-3L10 5ZM12 9v5m0 3v.1">
</path>
</svg>
<div class="alert-content">
<strong class="alert-title">
Storage nearly full
</strong>
<p>
Remove unused files before uploading more.
</p>
</div>
</div>
<div class="alert" data-tone="error">
<svg
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.75"
stroke-linecap="round"
stroke-linejoin="round"
class="icon alert-icon"
aria-hidden="true"
focusable="false"
>
<circle cx="12" cy="12" r="9">
</circle>
<path d="m9 9 6 6m0-6-6 6">
</path>
</svg>
<div class="alert-content">
<strong class="alert-title">
Upload failed
</strong>
<p>
Check your connection and try again.
</p>
</div>
</div>
</div>With an action
Keep the next step close to the message.
Learn how to set up your workspace.
View Code
<div class="alert" data-tone="info">
<svg
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.75"
stroke-linecap="round"
stroke-linejoin="round"
class="icon alert-icon"
aria-hidden="true"
focusable="false"
>
<circle cx="12" cy="12" r="9">
</circle>
<path d="M12 11v6m0-10v.1">
</path>
</svg>
<div class="alert-content">
<strong class="alert-title">
Get started
</strong>
<p>
Learn how to set up your workspace.
</p>
<div class="alert-actions">
<a class="btn secondary btn-sm" href="/docs">
Read the Guide
</a>
</div>
</div>
</div>Dismissible
Dismiss the message with a keyboard or pointer. Reload the page to restore this example.
Your files are ready to download.
View Code
<div class="alert" data-tone="success">
<svg
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.75"
stroke-linecap="round"
stroke-linejoin="round"
class="icon alert-icon"
aria-hidden="true"
focusable="false"
>
<circle cx="12" cy="12" r="9">
</circle>
<path d="m7 12 3 3 7-7">
</path>
</svg>
<div class="alert-content">
<strong class="alert-title">
Export ready
</strong>
<p>
Your files are ready to download.
</p>
</div>
<button
class="btn ghost btn-icon alert-dismiss"
type="button"
data-alert-dismiss
aria-label="Dismiss Message"
hidden
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.75"
stroke-linecap="round"
stroke-linejoin="round"
class="icon"
aria-hidden="true"
focusable="false"
>
<path d="m6 6 12 12M18 6 6 18">
</path>
</svg>
</button>
</div>Full-width banner
Place this variant in a full-width page region. It wraps naturally on mobile.
View Code
<div class="alert alert-banner" data-tone="info">
<svg
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.75"
stroke-linecap="round"
stroke-linejoin="round"
class="icon alert-icon"
aria-hidden="true"
focusable="false"
>
<circle cx="12" cy="12" r="9">
</circle>
<path d="M12 11v6m0-10v.1">
</path>
</svg>
<div class="alert-content">
<p class="alert-message">
<strong>
New to Layout UI?
</strong>
Explore the setup guide to get started.
</p>
<div class="alert-actions">
<a class="btn secondary btn-sm" href="/docs">
Read the Guide
</a>
</div>
</div>
<button
class="btn ghost btn-icon alert-dismiss"
type="button"
data-alert-dismiss
aria-label="Dismiss Message"
hidden
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.75"
stroke-linecap="round"
stroke-linejoin="round"
class="icon"
aria-hidden="true"
focusable="false"
>
<path d="m6 6 12 12M18 6 6 18">
</path>
</svg>
</button>
</div>Right-to-left
Icons, actions and dismissal follow the reading direction.
גרסה חדשה של סביבת העבודה זמינה.
View Code
<div dir="rtl" lang="he">
<div class="alert" data-tone="info">
<svg
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.75"
stroke-linecap="round"
stroke-linejoin="round"
class="icon alert-icon"
aria-hidden="true"
focusable="false"
>
<circle cx="12" cy="12" r="9">
</circle>
<path d="M12 11v6m0-10v.1">
</path>
</svg>
<div class="alert-content">
<strong class="alert-title">
עדכון זמין
</strong>
<p>
גרסה חדשה של סביבת העבודה זמינה.
</p>
</div>
<button
class="btn ghost btn-icon alert-dismiss"
type="button"
data-alert-dismiss
aria-label="Dismiss Message"
hidden
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.75"
stroke-linecap="round"
stroke-linejoin="round"
class="icon"
aria-hidden="true"
focusable="false"
>
<path d="m6 6 12 12M18 6 6 18">
</path>
</svg>
</button>
</div>
</div>Installation
Download these files into the matching paths in your project, or use Create to assemble a kit. Include each dependency once. Do not also load app.css.
<link rel="stylesheet" href="/library/assets/base.css">
<link rel="stylesheet" href="/library/assets/button.css">
<link rel="stylesheet" href="/library/assets/alert.css">
<script defer src="/library/assets/alert.js"></script>13,865 bytes CSS including base · 1,574 bytes runtime JavaScript
Usage
Messages and announcements
Static page messages do not need a live-region role. Use role=status for dynamically inserted updates; reserve role=alert for urgent errors. Include meaningful text and a status icon so color is not the only cue.
Banners and dismissal
alert-inline pairs a short message with a trailing action; alert-banner fills its parent. Both wrap actions on small screens. It is not fixed or sticky by default. Optional dismissal reveals a hidden close button and keeps keyboard focus outside the dismissed message. Applications own actions, persistence and restoring messages.
Building with AI? The AI Manifest has these notes and the full contract. See the AI Guide.