Skip to content
Lumenan Studio

Toasts

Toasts are small, temporary notifications for saves, errors, messages and updates. Some examples here are always visible so you can see the styling; the others appear when you press their button. Containers stack several toasts neatly, and helper classes position them anywhere.

1Basic toast

A visible toast (<code>.toast.show</code>) with header, timestamp, close button and a short message.

2Translucent

Toasts are slightly translucent, so they blend over coloured or busy backgrounds.

3Stacking

Several toasts in a <code>.toast-container</code> stack with even spacing.

4Custom content

Leave out the header and put the message and close button side by side.

5With actions

Buttons below the message for a decision directly in the toast.

6Color scheme

<code>.text-bg-primary .border-0</code> and a white close button for a solid coloured toast.

7Status variants

Success, warning and danger messages in one container.

8Live toast

Click the button: <code>data-demo-toast="#id"</code> shows the hidden toast, which hides itself after a few seconds.

9Success on save

A green confirmation toast after a save button is pressed.

10Error message

A danger toast with a header and a retry link.

11Undo action

A dark toast confirming a move, with an Undo button - the classic pattern for reversible actions.

12Several triggers

Each button shows its own toast; they stack in one container.

13Message notification

Avatar, name and a message preview with a reply button.

14With a timer bar

A thin progress bar at the bottom suggests how long the toast stays.

15Added to cart

A product thumbnail, name and price after an add-to-cart click.

16Placement in a corner

A container positioned bottom-right inside a relative box - the same idea used at page level.

17Centered placement

<code>.top-50 .start-50 .translate-middle</code> center the container.

18Stays until closed

<code>data-ui-autohide="false"</code> keeps the toast visible until the user closes it.

19Cookie notice

A wider static toast with a short notice and two buttons.

20Longer delay

<code>data-ui-delay="10000"</code> keeps an update notice on screen for ten seconds.