Inline Notification
Saved
Payment failed
Storage almost full
Heads up
A feedback banner fixed in the page flow: status icon, title, body, optional
link, actions and close button. Like
Notification but in-page
rather than floating — and unlike
Alert Dialog, it never
interrupts: it is a live region the user reaches in the normal reading order.
(Previously named “Alert” — renamed because the alert that interrupts is the
Alert Dialog; ARIA’s role="alert" remains available here for urgent
messages.)
Import
Section titled “Import”<script> import InlineNotification from "@invisible-ui/svelte/InlineNotification.svelte";</script><script setup> import { InlineNotification } from "@invisible-ui/vue";</script>import { InlineNotification } from "@invisible-ui/react";<script type="module"> import "@invisible-ui/elements/define";</script>
<ds-inline-notification></ds-inline-notification>| Prop | Type | Default | Description |
|---|---|---|---|
status | FeedbackStatus | "info" | Feedback status: info | success | warning | danger | neutral. |
title * | string | — | Heading (required). |
description * | string | — | Body text (required). Override with children for rich content. |
href | string | undefined | undefined | Link href. When set (and no link snippet is provided) a link is rendered. |
linkText | string | undefined | undefined | Link text. Defaults to the i18n catalog's "Learn more". |
actions | InlineNotificationAction[] | Snippet | undefined | undefined | Action buttons, as data, or a snippet that replaces the whole actions area. |
closable | boolean | false | Render the close button. Defaults to false (not dismissible). |
closeLabel | string | undefined | undefined | Close button accessible name. Defaults to the i18n catalog's "Close". |
open | boolean | true | Controls visibility (bindable). Dismissing sets it to false; set it back to true to show the notification again. |
role | "status" | "alert" | "region" | "group" | "status" | Live-region role. "status" (polite) by default; "alert" for urgent. |
inverted | boolean | false | High-contrast inverse surface (opposite of the page) for maximum visibility. |
plain | boolean | false | No-surface variant: drop the tinted background and border (the message sits on the page). The status stays visible via the colored FeedbackIcon chip. |
iconShape | "rounded" | "round" | "rounded" | Shape of the FeedbackIcon box — "rounded" (default) or a full "round" circle. |
iconBox | "tint" | "transparent" | "solid" | undefined | undefined | FeedbackIcon box override. By default the box is tinted on plain/inverted alerts and transparent on tinted surfaces (so it doesn't clash); set "tint" or "solid" to force a visible chip on a tinted surface too. |
snack | boolean | false | Snackbar layout: one compact, vertically-centered row — icon, title and inline actions — in a container that wraps its content. The description is dropped and the icon takes the text color with no box. Meant for the floating Notification, not the in-page banner. |
component | import("svelte").Component<any> | import("svelte").ComponentType | undefined | undefined | Render arbitrary content as the body instead of description / children — a Svelte component plus its props. Lets a data-driven notifier carry rich content (a file preview, an avatar row). Ignored in snack layout. |
componentProps | Record<string, unknown> | {} | Props passed to component. |
onclose | (() => void) | undefined | undefined | Called when dismissed. |
onmouseenter | ((event: MouseEvent) => void) | undefined | undefined | Called when the pointer enters the live region. |
onmouseleave | ((event: MouseEvent) => void) | undefined | undefined | Called when the pointer leaves the live region. |
onfocusin | ((event: FocusEvent) => void) | undefined | undefined | Called when focus moves into the live region. |
onfocusout | ((event: FocusEvent) => void) | undefined | undefined | Called when focus leaves the live region. |
icon | Snippet | undefined | undefined | Custom glyph, forwarded to the FeedbackIcon. |
link | Snippet | undefined | undefined | Custom link content, in place of the href link. |
| Prop | Type | Default | Description |
|---|---|---|---|
status | FeedbackStatus | "info" | Feedback status: info | success | warning | danger | neutral. |
title * | string | — | Heading (required). |
description * | string | — | Body text (required). Override with the default slot for rich content. |
href | string | undefined | Link href. When set (and no link slot is provided) a link is rendered. |
linkText | string | undefined | Link text. Defaults to the i18n catalog's "Learn more". |
actions | InlineNotificationAction[] | undefined | Action buttons (alternative to the actions slot). |
closable | boolean | false | Render the close button. Defaults to false (not dismissible). |
closeLabel | string | undefined | Close button accessible name. Defaults to the i18n catalog's "Close". |
open | boolean | true | Controls visibility; bindable with v-model:open. Dismissing sets it to false; set it back to true to show the notification again. |
role | "status" | "alert" | "region" | "status" | Live-region role. "status" (polite) by default; "alert" for urgent. |
inverted | boolean | false | High-contrast inverse surface (opposite of the page) for maximum visibility. |
plain | boolean | false | No-surface variant: drop the tinted background and border (the message sits on the page). The status stays visible via the colored FeedbackIcon chip. |
iconShape | "rounded" | "round" | "rounded" | Shape of the FeedbackIcon box — "rounded" (default) or a full "round" circle. |
iconBox | "tint" | "transparent" | "solid" | undefined | FeedbackIcon box override. By default the box is tinted on plain/inverted notifications and transparent on tinted surfaces (so it doesn't clash); set "tint" or "solid" to force a visible chip on a tinted surface too. |
snack | boolean | false | Snackbar layout: one compact, vertically-centered row — icon, title and inline actions — in a container that wraps its content. The description is dropped and the icon takes the text color with no box. Meant for the floating Notification, not the in-page banner. |
component | Component | undefined | Render arbitrary content as the body instead of description / the default slot — a Vue component plus its props. Lets a data-driven notifier carry rich content (a file preview, an avatar row). Ignored in snack layout. |
componentProps | Record<string, unknown> | () => ({}) | Props passed to component. |
onClose | () => void | undefined | Called when dismissed. |
| Event | Payload |
|---|---|
update:open | open: boolean |
Slots: actions, default, icon, link.
| Prop | Type | Default | Description |
|---|---|---|---|
status | FeedbackStatus | "info" | Feedback status: info | success | warning | danger | neutral. |
title * | string | — | Heading; it names the notification. |
description * | string | — | Body text. children replace it with rich content. |
href | string | — | Link href. When set, and no link is given, a link renders. |
linkText | string | — | Link text. Defaults to the catalog's "Learn more". |
actions | InlineNotificationAction[] | ReactNode | — | Action buttons as data, or markup of your own. |
closable | boolean | false | Render the close button. Defaults to false. |
closeLabel | string | — | Close button name. Defaults to the catalog's "Close". |
open | boolean | true | Whether it shows. Closing hides it and reports false through onOpenChange; set it back to true to show it again. |
onOpenChange | (open: boolean) => void | — | Called when the close button hides the notification. |
role | "status" | "alert" | "region" | "group" | "status" | "status" (polite live region, default) or "alert" (urgent). "region" makes a named landmark. "group" is for a notification that a live region elsewhere announces, as in a dialog's status area (ADR 0016): it is named by its title and is not a live region itself. |
inverted | boolean | false | A high-contrast surface, the opposite of the page. |
plain | boolean | false | No surface: no tint and no border; the coloured icon chip shows the status. |
iconShape | "rounded" | "round" | "rounded" | Shape of the icon box: "rounded" (default) or a full "round" circle. |
iconBox | "tint" | "transparent" | "solid" | — | Icon box override. By default the box is tinted on a plain or inverted notification and transparent on a tinted surface; set "tint" or "solid" to force a chip there too. |
snack | boolean | false | Snackbar layout: one compact row with the icon, the title and inline actions; the body is left out. Meant for the floating Notification. |
component | ComponentType<any> | — | A component rendered as the body in place of description and children, with componentProps, so a notifier given data can carry rich content. Ignored in the snack layout. |
componentProps | Record<string, unknown> | — | Props passed to component. |
onClose | () => void | — | Called after the close button hid the notification. |
icon | ReactNode | — | A custom glyph for the icon. |
link | ReactNode | — | Link markup of your own, in place of the href link. |
children | ReactNode | — | Rich body content, in place of description. |
| Attribute | Reactive | Description |
|---|---|---|
title * | yes | |
description | yes | |
status | yes | |
href | yes | |
link-text | yes | |
closable | yes | |
close-label | yes | |
open | yes | |
role | yes | |
inverted | yes | |
plain | yes | |
icon-shape | yes | |
icon-box | yes | |
snack | yes |
Reactive attributes re-render the element when they change after the first render.
Properties: open (boolean).
Events: close and open-change after the close button is activated.
Every href is rendered as given: pass only URLs you trust or have
sanitized. See Security.
Accessibility
Section titled “Accessibility”- A live region:
role="status"(polite) by default; passrole="alert"for urgent messages. - Status is conveyed by color + glyph + surface tint, never color alone; the FeedbackIcon is decorative.
- Not dismissible by default — set
closableto render the WCAG-sized ghost close button.
Example
Section titled “Example”<InlineNotification status="success" title="Saved" description="Your changes have been saved." closable/>Elements uses light DOM for rich body content and the icon, link, and
actions regions. Dismissal updates the open property and emits bubbling
close and open-change events:
<ds-inline-notification status="success" title="Saved" description="Your changes have been saved." closable close-label="Dismiss saved message"></ds-inline-notification>In React, icon, link, actions and children take markup, and
actions also takes entries. open with onOpenChange controls it:
<InlineNotification status="danger" title="Payment failed" description="The card was declined." actions={[{ label: "Retry", variant: "primary", onClick: retry }]} closable onClose={() => track("payment-error-dismissed")}/>Use role="alert" only for urgent feedback that should interrupt the current
announcement. The default role="status" remains polite.
Themeable via --ds-alert-* (and the --ds-color-* token layer).