Dojo NG is being built in the open, one section at a time — follow along on Heptapod.

API REFERENCE · OVERLAYS

<dj-snackbar>

A toast. open shows it; type success/error tints; slots: default (message), actions.

Announcements: the snackbar keeps two empty live regions in the accessibility tree at all times, hidden or not, and copies the message text into one when it opens. type="error" uses the assertive region (role="alert"); every other type uses the polite one (role="status"). Changing the message while open announces the new text. The visible message is hidden from assistive tech so it is not read twice; the actions slot stays reachable.

Try it in the playground

@dojo-ng/snackbar · v0.1.3

npm install @dojo-ng/snackbar

import "@dojo-ng/snackbar";

Properties

PropertyAttributeTypeDefault
open open boolean false
type type "success""error" None
leading leading boolean false
stacked stacked boolean false

Slots

Default slotactions

CSS custom properties

PropertyDefaultDescription
--dj-snackbar-z-index960Stacking order of the snackbar.