Skip to content

Feature Overview

Peyton Gasink edited this page Feb 19, 2021 · 3 revisions

Contents

Theming: Heads Up, Lights Out

Built-in support for both light and dark themes. By default, the user's operating system preference will determine the theme, but this can be overridden. In an unsupported browser/OS combo, Bootstrap's default 'light' theme will take over.

Toasts transitioning from light to dark theme

Placement: Serving Up Toast, Coast-to-Coast

On desktop, the toast container defaults to the top right corner of the viewport, though this placement can be configured to any of 9 different areas. On mobile, the toast container will automatically lock to top center.

Timers: Too Much Time on My Hands

Toasts support options for how long they exist on the page before expiring automatically, or if they must be dismissed manually. Additionally, each toast displays the elapsed time since it was rendered, updated once per minute. The elapsed timers are enabled by default but can be disabled globally.

Maximum Toast Count: Complexity Reducers vs. Information Producers

Too many toasts can overwhelm and annoy the user, so by default no more than 4 will be allowed to render on the page. For new ones to be generated, old ones must go. This maximum count is also configurable. In the event that the number of toasts overflows the height of the viewport, the toast container becomes scrollable too.

Accessibility: Built-in, Out-of-the-Box

The container that houses all of the toasts is setup as an aria-live region, so changes to its descendant elements will alert screen readers. Success and Info toasts will read out when the user is not busy, leaving their flow uninterrupted, while Error and Warning toasts will read out immediately. In addition, all toast status icons and elapsed timers are hidden to screen readers, as they are purely visual indicators.