Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Lead:  Liav Nadler

Status
colourYellow
titleongoing
 Related pages: Message Popups

Table of Contents

Description

A toast is a small message box that appears in response to a user 's action or system event. It contains a simple feedback about the actionevent, while any current activity remains visible and interactive.

A toast may be closed by the user or disappear automatically after few seconds. 

Format

A toast may contain the following elements:

  • Icon, e.g. confirmation, warning etc. or, in case of a continuous action, animated loader (optional)
  • Text, e.g. Item deleted
  • Action button (optional), e.g. Undo (optional)
  • Close button (optional)

Types

...

Image Removed

...

Image Removed

...

General guidelines

<<describes the component, use sub-section when they are relevant to the components>>

Expand
titleExample for heading in general

<<use heading 3>>

  • Text (Headings, labels, microcopty, help text Etc..) ( how to write microcopy for that component. For example, in lists the list items must be grammatically parallel and don’t mix active and passive voice etc)
  • Format / structure (describe the objects the component is made of and are optional e.g. search bar in a table) (for search component include - variations, results)(for tabs - Number of tabs)
  • Content (for example, in dropdowns and lists)
  • Length (e.g. length of list)
  • Order (e.g. order of drop down menu)
  • Placement or Positioning (when this is important, e.g. toast message)
  • Internal Logic (when explaining how to use different components inside the current component. For example, when to use radio buttons, checkboxes, and fields in a form)
  • Default section or Default values 

States

<<e.g. active disabled, error, hover, temporary (spinner size), empty etc...>>

Interaction

<<for example, how to change a value – type, arrows, use slider>>

<<use Click target to describe the interaction>>

Validations and errors

<<used for specific components e.g. slider>>

Best practices

<<e.g. Slider should display a .label its on>>

Accessibility compliance

<<In general each component should be A11y complied,  please follow the 3 guidelines linked below. At the very least we should document that each component is in compliance with each of the 3>>

Focus management

While the toast is shown any current activity remains visible and interactive

Screen reader support 

<<Make sure the components support screen reader for content or behaviour where needed - see /wiki/spaces/UX/pages/308248620 >>

Contrast & size compliance

<<Visual designers must comply with the minimal of /wiki/spaces/UX/pages/301498483 for each component>>

Design

...

Code

<<a box containing the code - discuss with Femi>>.

Types

Type

Usage

Example

Information

General information related to an action.

Image Added

Success

Actions that were completed successfully.

Image Added

Warning

System warnings or actions that may cause a problem.

Image Added

Error

System errors or actions that have failed to complete.

Image Added

Continuous Action

An action that takes more than 3 seconds.

Image AddedImage Added

Usage & Behavior

General guidelines

  • Toasts are triggered either by the user (e.g. refreshing a data table) or by the system (e.g. a server error).

  • Toasts appear from the bottom-left side of the screen using a slide effect.

  • Error toasts stay on the screen until the user actively closes them.

  • Other types of toast disappear automatically after a few seconds with a fade effect.

  • The user can always close a toast manually, even if it will automatically close.

Structure

A toast may consist of:

  • Either:

    • an icon representing the type of toast, such as a check mark or warning triangle, or

    • where there is a continuous action, an animated Progress Indicator.

  • Text, including:

    • a title (optional).

    • the message body.

  • A closing button (x).

  • A Cancel button, for continuous actions.

  • An expand button for longer messages (see Placement below).

Placement and Positioning

  • All toasts appear from the bottom-left side of the screen (using a slide effect).

  • Toasts have a fixed width.

  • The height of a toast depends on the amount of text it contains. Where there are more than 3 lines an expand button will appear, allowing the user to enlarge the toast.

Image Added

Image Added

Interaction

  • Mouseover a toast will keep it visible, even after exceeding the time limit before it disappears.

  • Clicking the closing button (x) closes the toast with a short fade effect.

  • When shown, clicking the Cancel button cancels the continuous action which has triggered the toast, and closes it. In this case, another information toast may appear, indicating that the action was canceled.

  • When shown, clicking the expand button:

    • expands the toast upwards with a slide effect, revealing the rest of the text.

    • hides the expand button.

    • pushes all other toasts upwards (see Multiple Toasts below).

Multiple Toasts

  • Where a new toast appears before a previous one has been closed, the page will show multiple toasts.

Condition

Behavior

Design

The new toast is not an error toast (i.e. info or success toasts etc.)

The new toast will appear on top, above all previous toasts.

Image Added

The new toast is the first error toast on the page.

The new toast will appear at the bottom, pushing all other toasts upwards.

The new toast is an additional error toast (there are other error toasts already on the page).

The new error toast will be stacked behind the existing error toasts. It should appear underneath and slightly above the previous error toasts, showing the first line of text. In this case:

  • The user can switch between toasts by clicking on the visible portion of each one.

  • Clicking a toast will move it to the front.

  • The closing button will appear only on the toast that’s on top.

  • Closing any toast except the top one will move the remaining group of toasts downwards.

Image Added

Best practices

Use:

  • to display application-level messages, warnings, and errors.

  • when you need a relatively unobtrusive way to show messages, and to keep the rest of the page interactive.

Don’t use:

General

  • Keep the text short and informative.

  • For warning or error toasts, offer the user a way to recover.

Accessibility compliance

Unless otherwise specified, see our general compliance information in Fundamentals - Accessibility.

Design

Zeplin link

Screen thumbnail

https://zpl.io/2ynev9n

Image Added

Code

...