Notice
A presentational message: severity, icon and text. Payload only — no live role, no announcement, no dismissal. To announce it, the context renders it into a persistent live region.
Variants
One accent token per severity. The icon carries the meaning alongside the colour; the tint is derived from the accent.
Please fill in all required fields before continuing.
You have used 90% of your storage quota.
Your changes have been saved.
Maintenance is scheduled for Sunday at 02:00 UTC.
Your trial ends in three days.
---
import Notice from "tsugite/Notice/Notice.astro";
---
<Notice variant="error" title="Validation error">
<p>Please fill in all required fields before continuing.</p>
</Notice>
<Notice variant="warning" title="Almost out of space">
<p>You have used 90% of your storage quota.</p>
</Notice>
<Notice variant="success" title="Saved">
<p>Your changes have been saved.</p>
</Notice>
<Notice variant="info" title="Heads up">
<p>Maintenance is scheduled for Sunday at 02:00 UTC.</p>
</Notice>
<Notice variant="neutral" title="Reminder">
<p>Your trial ends in three days.</p>
</Notice>Border
data-border adds a full border in the accent colour. Nothing else changes.
A full border in the accent colour.
The border follows the variant, nothing else changes.
---
import Notice from "tsugite/Notice/Notice.astro";
---
<Notice variant="error" border title="Validation error">
<p>A full border in the accent colour.</p>
</Notice>
<Notice variant="info" border title="Heads up">
<p>The border follows the variant, nothing else changes.</p>
</Notice>Emphasis
data-emphasis is the styled hook: a thick leading bar. The toggles are independent and compose.
The thick leading bar is the richest look — the "styled" hook.
Emphasis and border compose; each toggle is independent.
---
import Notice from "tsugite/Notice/Notice.astro";
---
<Notice variant="warning" emphasis title="Almost out of space">
<p>The thick leading bar is the richest look — the "styled" hook.</p>
</Notice>
<Notice variant="success" emphasis border title="Saved">
<p>Emphasis and border compose; each toggle is independent.</p>
</Notice>Without icon
data-icon="false" drops the icon and lets the content take the whole width.
Without the icon, severity is carried by the tint alone — use sparingly.
---
import Notice from "tsugite/Notice/Notice.astro";
---
<Notice variant="info" icon={false} title="Text only">
<p>Without the icon, severity is carried by the tint alone — use sparingly.</p>
</Notice>Footprint
data-grow-inline and data-cap-inline: may it take more room than its content, and is there a reading ceiling. The default is both.
Natural width, no ceiling.
A long message shrinks to its text but wraps at the reading ceiling instead of running on across the whole page.
A validation summary fills the form it belongs to, whatever its width.
---
import Notice from "tsugite/Notice/Notice.astro";
---
{/* Two booleans on the inline axis (ADR-0015). grow: may it take more room than its
content; cap: is there a reading ceiling. Default is grow + cap. */}
<Notice variant="success" growInline={false} capInline={false} title="Saved">
<p>Natural width, no ceiling.</p>
</Notice>
<Notice variant="info" growInline={false} title="Natural width, capped">
<p>A long message shrinks to its text but wraps at the reading ceiling instead of running on across the whole page.</p>
</Notice>
<Notice variant="error" capInline={false} title="Three fields need attention">
<p>A validation summary fills the form it belongs to, whatever its width.</p>
</Notice>Actions and dismiss
Two slots the host fills. Buttons go in actions, under the body; a dismiss control goes in dismiss, in the top-end corner, where a third column opens. Notice places them and nothing more: the buttons keep their own size and emphasis, and what the dismiss control does belongs to the host, never to Notice — it owns no lifetime, as it owns no live role.
Version 4.2 fixes the export and adds the calendar view. Reload to get it.
Your session ends in five minutes.
---
import Notice from "tsugite/Notice/Notice.astro";
import LinkButton from "tsugite/Button/LinkButton.astro";
import ActionButton from "tsugite/Button/ActionButton.astro";
---
{/* Two slots the host fills: `actions` under the body, `dismiss` in the top-end corner.
Notice places them and nothing more — the buttons' size and emphasis are the host's,
and what the dismiss control does is the host's (or the kernel's), never Notice's. */}
<Notice variant="info" title="A new version is available">
<p>Version 4.2 fixes the export and adds the calendar view. Reload to get it.</p>
<LinkButton slot="actions" href="#" size="sm" iconStart="icon-info">Release notes</LinkButton>
<ActionButton slot="actions" size="sm" emphasis="secondary">Reload</ActionButton>
<ActionButton slot="dismiss" size="sm" emphasis="secondary" iconEnd="cancel" aria-label="Dismiss" />
</Notice>
<Notice variant="warning" icon={false}>
<p>Your session ends in five minutes.</p>
<ActionButton slot="dismiss" size="sm" emphasis="secondary" iconEnd="cancel" aria-label="Dismiss" />
</Notice>Test bench
The package fixture the conformance suite runs against — every variant and state, mounted unchanged.
Notice
Variants
Please fill in all required fields before continuing.
You have used 90% of your storage quota.
Your changes have been saved.
Maintenance is scheduled for Sunday at 02:00 UTC.
Your trial ends in three days.
Border (data-border="true")
A full border in the accent colour.
Styled (data-emphasis="true")
A thick leading accent bar — the richest look.
Enriched (border + emphasis)
Border and leading bar together — the most decorated Notice.
No icon
The icon column collapses when data-icon="false".
No title
A single-line confirmation with no heading.
Single line
Please fill in all required fields before continuing.
Long content
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.
Live-region pattern (announcer)
Please fill in all required fields.