Ding 0.0.6

Changes in Ding 0.0.6: held toasts and queue modes.

All releases ·

A toast that waits for you keeps its place Fixed

A toast is held when it stays until dismissed: an error, a toast with a button, or one with duration: 0. Before, any new toast morphed the held one away. Now the held toast stays and quick toasts appear next to it.

Show the error first, then the other two. The error stays.

Choose how toasts share the screen New

The new held option of toast.configure decides what happens when a toast arrives while a held toast is on screen.

toast.configure({ held: 'list' }); // list, queue or replace
  • list is the default. The held toast keeps its place and quick toasts appear next to it. A new held toast takes over the quick one.
  • queue makes new toasts wait in order. They show one after another once the held toast is gone.
  • replace is how 0.0.5 behaved. A new toast morphs the one on screen, held or not.

Pick a mode, then run the three toasts above again.

Upgrading Changed

The default changed from replace to list. If a held toast was replaced before, it now stays until the user dismisses it. To keep the old behavior, set it once:

toast.configure({ held: 'replace' });

In plain DOM, mountToaster({ held: 'replace' }) does the same. A loading toast is not held, because it is about to turn into its result. See Held toasts in the docs.