Message
Inline section message (callout) with a colored edge bar: contextual info, warnings, errors, successes, or discovery announcements embedded in page flow. For full-width page-level announcements use the .banner subcomponent; for floating toast notifications use .flag.
Root: .message on <div>, <section>
Example
<div class="message message-warning"><div class="message-title">Trial ending</div><p>Your trial expires in 3 days.</p><div class="message-actions"><a href="#">Upgrade</a></div></div>
Authoring source
<lz-message variant="warning" title="Trial ending">
<p>Your trial expires in 3 days.</p>
</lz-message>
<lz-flag title="Issue created" icon="story" actions="true">
LOZ-42 has been added to the backlog.
<a slot="actions" href="#">View issue</a>
</lz-flag>
Expands to
<div class="message message-warning" data-lz="message" data-lz-version="0.1.0">
<div class="message-title">Trial ending</div>
<p>Your trial expires in 3 days.</p>
</div>
<div class="flag" actions="true" data-lz="flag" data-lz-version="0.1.0">
<div class="flag-icon"><span class="issue-type issue-type-story" role="img" aria-label="story"></span></div>
<div class="flag-content">
<div class="flag-title">Issue created</div>
<div class="flag-description">
LOZ-42 has been added to the backlog.
</div>
<div class="flag-actions"><a href="#">View issue</a></div>
</div>
<button class="flag-dismiss" aria-label="Dismiss">×</button>
</div>
Authoring tags are macro-expanded to the canonical HTML above at build time (Vite plugin or lz-expand CLI) — the shipped artifact has no runtime.
Contract
Variants & modifiers
| Class | Axis | Rules |
|---|---|---|
message-info | tone | optional · exclusive |
message-warning | tone | optional · exclusive |
message-error | tone | optional · exclusive |
message-success | tone | optional · exclusive |
message-discovery | tone | optional · exclusive |
Structure
| Selector | Required | Description |
|---|---|---|
.message-title | optional | Bold heading line, first child. |
.message-actions | optional | Row of action links after the body text. |
Accessibility
Tone is conveyed by color only — make the text itself state the severity (the title usually does). Messages inserted dynamically should get role="status" (or role="alert" for errors) so they are announced.
Nesting
Allowed in:
page content.modal-body.card-body
Never inside (or containing):
.message
Subcomponents
Flag
Floating toast notification (bottom-left in Jira): icon, content block (title/description/actions), and a dismiss button. Add .flag-fixed to pin it to the viewport; bold tone variants recolor the whole flag for success/error toasts. It is a glass surface.
Root: .flag on <div>
Examples
<div class="flag flag-success" role="status"><div class="flag-content"><div class="flag-title">Changes saved</div></div><button class="flag-dismiss" aria-label="Dismiss">×</button></div>
<div class="flag" role="status"><div class="flag-icon"><span class="issue-type issue-type-story" aria-label="Story"></span></div><div class="flag-content"><div class="flag-title">Issue created</div><div class="flag-description">LOZ-42 added to the backlog.</div><div class="flag-actions"><a href="#">View issue</a></div></div><button class="flag-dismiss" aria-label="Dismiss">×</button></div>
Variants & modifiers
| Class | Axis | Rules |
|---|---|---|
flag-info | tone | optional · exclusive |
flag-warning | tone | optional · exclusive |
flag-error | tone | optional · exclusive |
flag-success | tone | optional · exclusive |
flag-discovery | tone | optional · exclusive |
flag-fixed | modifier | optional |
Structure
| Selector | Required | Description |
|---|---|---|
.flag-content | required | The flexible middle block (flex:1, min-width:0) holding .flag-title, optional .flag-description, and optional .flag-actions. |
.flag-content > .flag-title | optional | Heading line of the toast. |
.flag-icon | optional | Optional leading icon block (e.g. an .issue-type square), flex-shrink:0. |
button.flag-dismiss | optional | Optional trailing × close button. |
Accessibility
| On | Attribute | Level | When |
|---|---|---|---|
.flag-dismiss | aria-label | required |
Toasts appear asynchronously: give the flag (or its container) role="status", or role="alert" for error flags, so screen readers announce it. .flag-dismiss must carry aria-label (its content is just ×). The flag is a glass surface — never nest another glass surface (dropdown-menu, modal, navbar, another flag) inside it, and never mount a flag inside one; glass-on-glass compounds blur and voids the contrast guarantees.
Nesting
Allowed in:
directly under <body> (with .flag-fixed), or a toast stack container
Never inside (or containing):
.flag.dropdown-menudialog.modal.navbar