Logo v4.3.1
Getting Started Introduction
Getting Started Gulp
Getting Started Customization
Getting Started Credits
Getting Started Changelog
Design & Graphics Bootstrap Icons
Design & Graphics Duotone Icons
Design & Graphics Illustrations
Components Accordion
Components Alerts
Components Avatars
Components Badge
Components Breadcrumb
Components Buttons
Components Cards
Components Collapse
Components Column divider
Components Devices
Components Divider
Components Dropdowns
Components Icons
Components List Group
Components Lists
Components Legend Indicator
Components Modal
Components Offcanvas
Components Page Header
Components Pagination
Components Popovers
Components Progress
Components Profile
Components Shapes
Components Spinners
Components Steps
Components Tab
Components Tables
Components Text Highlight
Components Toasts
Components Tooltips
Components Typography
Navbars Navbar
Navbars Navs
Navbars Mega Menu
Navbars Scrollspy
Basic forms Basic forms
Basic forms Checks and switches
Basic forms Input group
Utilities Backgrounds
Utilities Borders
Utilities Colors
Utilities Links
Utilities Position
Utilities Rotations
Utilities Shadows
Utilities Sizing
Utilities Spacing
Utilities Z-index
Advanced forms Advanced select
Advanced forms File attachments
Advanced forms Drag’ n’ drop file uploads
Advanced forms WYSIWYG Editor
Advanced forms Quantity counter
Advanced forms Input mask
Advanced forms Step forms (Wizards)
Advanced forms Wizards
Advanced forms Range slider (noUiSlider)
Advanced forms Add field
Advanced forms Toggle password
Advanced forms Count characters
Advanced forms Toggle switch
Advanced forms Toggle state
Advanced forms Switch
Media Fullscreen Lightbox
Media Video Background
Media Video Player
Media Swiper
Others Maps (Leaflet)
Others Chart.js
Others Circles.js (Pie Chart).js
Others Sticky block
Others Countdown
Others Sorting (Shuffle.js)
Others Go To
Others Show Animation
Others Typed.js
Image Description

No Results

  • Get Support
  • Preview Demo
Logo v4.3.1
  • Docs
  • Snippets
  • Documentation
  • Introduction
  • Getting started
  • Getting Started
  • Gulp
  • Customization
  • Credits
  • Changelog
  • Design & Graphics
  • Bootstrap Icons
  • Duotone Icons
  • Illustrations
  • Components
  • Accordion
  • Alerts
  • Avatars
  • Badge
  • Breadcrumb
  • Buttons
  • Cards
  • Collapse
  • Column Divider
  • Devices
  • Divider
  • Dropdowns
  • Icons
  • List Group
  • Lists
  • Legend Indicator
  • Modal
  • Offcanvas
  • Page Header
  • Pagination
  • Popovers
  • Progress
  • Profile
  • Shapes
  • Spinners
  • Steps
  • Tab
  • Tables
  • Text Highlight
  • Toasts
  • Tooltips
  • Typography
  • Navbars
  • Navbar
  • Navs
  • Mega Menu
  • Scrollspy
  • Basic forms
  • Basic Forms
  • Checks & Switches
  • Input Group
  • Advanced Forms
  • Advanced Select
  • File Attachments
  • Drag’ n’ Drop File Uploads
  • WYSIWYG Editor
  • Quantity Counter
  • Input Mask
  • Step Forms (Wizards)
  • Range Slider (noUiSlider)
  • Add Field
  • Toggle Password
  • Count Characters
  • Toggle Switch
  • Toggle State
  • Switch
  • Media
  • Fullscreen Lightbox
  • Video Background
  • Video Player
  • Swiper
  • Others
  • Maps (Leaflet)
  • Chart.js
  • Circles.js (Pie Chart)
  • Sticky Block
  • Countdown
  • Sorting (Shuffle.js)
  • Go To
  • Show Animation
  • Typed.js
  • Utilities
  • Backgrounds
  • Borders
  • Colors
  • Links
  • Position
  • Rotations
  • Shadows
  • Sizing
  • Spacing
  • Z-index

Toasts

Push notifications to your visitors with a toast, a lightweight and easily customizable alert message.

Bootstrap Toasts documentation

Basic example

  • Preview
  • HTML
Image description
Bob Dean
11 mins ago
Hello, world! This is a toast message.
<!-- Toast -->
<div class="toast toast-show fade show" role="alert" aria-live="assertive" aria-atomic="true">
  <div class="toast-header">
    <div class="d-flex align-items-center flex-grow-1">
      <div class="flex-shrink-0">
        <img class="avatar avatar-sm avatar-circle" src="../assets/img/160x160/img4.jpg" alt="Image description">
      </div>
      <div class="flex-grow-1 ms-3">
        <h5 class="mb-0">Bob Dean</h5>
        <small class="ms-auto">11 mins ago</small>
      </div>
      <div class="text-end">
        <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
      </div>
    </div>
  </div>
  <div class="toast-body">
    Hello, world! This is a toast message.
  </div>
</div>
<!-- End Toast -->
Copy

Live

Click the button the below to show as toast (positioning with our utilities in the lower right corner) that has been hidden by default with .hide.

  • Preview
  • HTML
  • JS
Image description
Bob Dean
11 mins ago
Hello, world! This is a toast message.
<!-- Toast Luncher -->
<button id="liveToastBtn" class="btn btn-primary">Toast</button>

<!-- Toast -->
<div id="liveToast" class="position-fixed toast hide" role="alert" aria-live="assertive" aria-atomic="true" style="top: 20px; right: 20px; z-index: 1000;">
  <div class="toast-header">
    <div class="d-flex align-items-center flex-grow-1">
      <div class="flex-shrink-0">
        <img class="avatar avatar-sm avatar-circle" src="../assets/img/160x160/img4.jpg" alt="Image description">
      </div>
      <div class="flex-grow-1 ms-3">
        <h5 class="mb-0">Bob Dean</h5>
        <small class="ms-auto">11 mins ago</small>
      </div>
      <div class="text-end">
        <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
      </div>
    </div>
  </div>
  <div class="toast-body">
    Hello, world! This is a toast message.
  </div>
</div>
<!-- End Toast -->
Copy
<script>
    // INITIALIZATION OF LIVE TOAST
    // =======================================================
    const liveToast = new bootstrap.Toast(document.querySelector('#liveToast'))
    document.querySelector('#liveToastBtn').addEventListener('click', () => liveToast.show())
</script>
Copy

Stacking

When you have multiple toasts, we default to vertically stacking them in a readable manner.

  • Preview
  • HTML
Image description
Bob Dean
11 mins ago
See? Just like this.
Image description
Ella Lauda
20 mins ago
Heads up, toasts will stack automatically
<div class="toast-container">
  <!-- Toast -->
  <div class="toast toast-show fade show" role="alert" aria-live="assertive" aria-atomic="true">
    <div class="toast-header">
      <div class="d-flex align-items-center flex-grow-1">
        <div class="flex-shrink-0">
          <img class="avatar avatar-sm avatar-circle" src="../assets/img/160x160/img4.jpg" alt="Image description">
        </div>
        <div class="flex-grow-1 ms-3">
          <h5 class="mb-0">Bob Dean</h5>
          <small class="ms-auto">11 mins ago</small>
        </div>
        <div class="text-end">
          <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
        </div>
      </div>
    </div>
    <div class="toast-body">
      See? Just like this.
    </div>
  </div>
  <!-- End Toast -->

  <!-- Toast -->
  <div class="toast toast-show fade show" role="alert" aria-live="assertive" aria-atomic="true">
    <div class="toast-header">
      <div class="d-flex align-items-center flex-grow-1">
        <div class="flex-shrink-0">
          <img class="avatar avatar-sm avatar-circle" src="../assets/img/160x160/img9.jpg" alt="Image description">
        </div>
        <div class="flex-grow-1 ms-3">
          <h5 class="mb-0">Ella Lauda</h5>
          <small class="ms-auto">20 mins ago</small>
        </div>
        <div class="text-end">
          <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
        </div>
      </div>
    </div>
    <div class="toast-body">
      Heads up, toasts will stack automatically
    </div>
  </div>
  <!-- End Toast -->
</div>
Copy

Placement

Place toasts with custom CSS as you need them. The top right is often used for notifications, as is the top middle. If you’re only ever going to show one toast at a time, put the positioning styles right on the .toast.

  • Preview
  • HTML
Image description
Bob Dean
11 mins ago
Hello, world! This is a toast message.
<!-- Toast -->
<div aria-live="polite" aria-atomic="true" style="position: relative; min-height: 200px;">
  <div class="toast toast-show fade show" role="alert" aria-live="assertive" aria-atomic="true" style="position: absolute; top: 0; right: 0;">
    <div class="toast-header">
      <div class="d-flex align-items-center flex-grow-1">
        <div class="flex-shrink-0">
          <img class="avatar avatar-sm avatar-circle" src="../assets/img/160x160/img4.jpg" alt="Image description">
        </div>
        <div class="flex-grow-1 ms-3">
          <h5 class="mb-0">Bob Dean</h5>
          <small class="ms-auto">11 mins ago</small>
        </div>
        <div class="text-end">
          <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
        </div>
      </div>
    </div>
    <div class="toast-body">
      Hello, world! This is a toast message.
    </div>
  </div>
</div>
<!-- End Toast -->
Copy