Toast component

Toasts are lightweight notifications designed to mimic the push notifications that have been popularized by mobile and desktop operating systems. They’re built with flexbox, so they’re easy to align and position. Toasts are as flexible as you need and have very little required markup. At a minimum, we require a single element to contain your “toasted” content and strongly encourage a dismiss button.

Basic toast

A very basic example of toast. Keep in mind that for performance reasons you must initialize them yourself. Also toasts will automatically hide if you don't specify autohide: false

Dismiss button

Our default close button can be used either in toast header or body. You can also use any element or button type with data-bs-dismiss="toast" attribute to close the toast

Rounded toast

Depending on toast location and overall component styling, you can show toasts with fully rounded corners. Just add .rounded-pill class to the base .toast container

Custom close button

You can also use regular buttons as alternative to "times" icon. Here we moved the button outside .toast-body so that is fills all available height and wrapped all content in flex container

Toast with header

Toast headers use display: flex, allowing easy alignment of content thanks to our margin and flexbox utilities. Altough header is optional, it's recommended for better user experience

Header with dismiss button

The right side in the header is usually reserved for some secondary text or action links, and is the default location of dismiss button. Use button with .btn-close within header container

Header with icon

Toast header text supports contextual icons in any alignment, style and color. Just add icon markup and control the distance between icons and text with our margin utility classes

Header with loading spinner

You can also use spinner component to visually indicate the loading state. Use our regular spinner markup inside .toast-header container before/after text and margin utility classes

Helper text

If you need to show a time stamp or any other text, just add to the header container. Additionally wrap header text in container with .me-auto to push all other content to the right

Header badge

Alternatively you can also show badge instead of helper text. The logic here is the same, and badge supports all styles and colors. Multiple badgeas are also supported

Toast with block button

Toast supports multiple bodies. Here we added .border-top to the second .toast-body to disually separate 2 containers and added regular button to simulate action panel

Toast with button group

You can also use multiple buttons to display a group of buttons in our usual toolbar format. You can change button alignment and fully control all styling options via our utility classes

Custom header background

One of the possible options for creating a set of contextual notifications. Use our color classes in .toast-header container along with .text-white and .btn-close-white classes

Custom border color

In addition to custom header background, you can also add our color utility classes .border-[color] to .toast and .toast-header containers to change the main border color

Dark toast

By default, toast component is designed in a light theme. You can create different toast color schemes with our color and background utilities. For a crisp edge, remove the default border with .border-0

Toast with custom background color

You can also use all our 9 colors to create a custom contextual set of notifications with solid background color. Just use .bg-[color] and .text-white in .toast container

Activity
New notifications
James has completed the task Submit documents from Onboarding list
2 hours ago
Margo has added 4 users to Customer enablement channel
3 hours ago
Subscription #466573 from 10.12.2021 has been cancelled. Refund case #4492 created
4 hours ago
Older notifications
Nick requested your feedback and approval in support request #458
3 days ago
Mike added 1 new file(s) to Product management project
new_contract.pdf
112KB
1 day ago
All hands meeting will take place coming Thursday at 13:45.
2 days ago
Christine commented on your community post from 10.12.2021
2 days ago
HR department requested you to complete internal survey by Friday
3 days ago
Loading...
Demo configuration
Color mode
Direction
Layouts
Purchase Limitless