Skip to content

Inline Notification

Saved

Your changes have been saved.

Payment failed

Try a different card.

Storage almost full

You are using 90% of your space — the round chip variant.

Update available

A new version of the app is ready to install.
See what's new

Heads up

This sits on the page with no surface — just the colored icon chip.

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.)

<script>
import InlineNotification from "@invisible-ui/svelte/InlineNotification.svelte";
</script>
PropTypeDefaultDescription
statusFeedbackStatus"info"Feedback status: info | success | warning | danger | neutral.
title *string—Heading (required).
description *string—Body text (required). Override with children for rich content.
hrefstring | undefinedundefinedLink href. When set (and no link snippet is provided) a link is rendered.
linkTextstring | undefinedundefinedLink text. Defaults to the i18n catalog's "Learn more".
actionsInlineNotificationAction[] | Snippet | undefinedundefinedAction buttons, as data, or a snippet that replaces the whole actions area.
closablebooleanfalseRender the close button. Defaults to false (not dismissible).
closeLabelstring | undefinedundefinedClose button accessible name. Defaults to the i18n catalog's "Close".
openbooleantrueControls 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.
invertedbooleanfalseHigh-contrast inverse surface (opposite of the page) for maximum visibility.
plainbooleanfalseNo-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" | undefinedundefinedFeedbackIcon 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.
snackbooleanfalseSnackbar 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.
componentimport("svelte").Component<any> | import("svelte").ComponentType | undefinedundefinedRender 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.
componentPropsRecord<string, unknown>{}Props passed to component.
onclose(() => void) | undefinedundefinedCalled when dismissed.
onmouseenter((event: MouseEvent) => void) | undefinedundefinedCalled when the pointer enters the live region.
onmouseleave((event: MouseEvent) => void) | undefinedundefinedCalled when the pointer leaves the live region.
onfocusin((event: FocusEvent) => void) | undefinedundefinedCalled when focus moves into the live region.
onfocusout((event: FocusEvent) => void) | undefinedundefinedCalled when focus leaves the live region.
iconSnippet | undefinedundefinedCustom glyph, forwarded to the FeedbackIcon.
linkSnippet | undefinedundefinedCustom link content, in place of the href link.

Every href is rendered as given: pass only URLs you trust or have sanitized. See Security.

  • A live region: role="status" (polite) by default; pass role="alert" for urgent messages.
  • Status is conveyed by color + glyph + surface tint, never color alone; the FeedbackIcon is decorative.
  • Not dismissible by default — set closable to render the WCAG-sized ghost close button.
<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).