2017-07-04 01:09:28 +02:00
---
layout: docs
title: Toasts
description: Push notifications to your visitors with a toast, a lightweight and easily customizable alert message.
group: components
toc: true
---
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.
2018-08-23 21:06:35 +02:00
## Overview
Things to know when using the toast plugin:
2018-09-19 07:01:16 +02:00
- Toasts are opt-in for performance reasons, so **you must initialize them yourself** .
2018-12-27 20:41:14 +01:00
- **Please note that you are responsible for positioning toasts.**
2018-09-19 07:01:16 +02:00
- Toasts will automatically hide if you do not specify `autohide: false` .
2018-08-23 21:06:35 +02:00
2020-10-13 15:37:21 +02:00
{{< callout info > }}
2019-07-08 20:05:54 +02:00
{{< partial " callout-info-prefersreducedmotion . md " > }}
2020-10-13 15:37:21 +02:00
{{< / callout > }}
2019-07-08 20:05:54 +02:00
2017-07-04 01:09:28 +02:00
## Examples
2018-09-19 07:01:16 +02:00
### Basic
To encourage extensible and predictable toasts, we recommend a header and body. Toast headers use `display: flex` , allowing easy alignment of content thanks to our margin and flexbox utilities.
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.
2017-07-04 01:09:28 +02:00
2019-01-08 17:33:28 +01:00
{{< example class = "bg-light" > }}
2018-08-31 09:18:28 +02:00
< div class = "toast" role = "alert" aria-live = "assertive" aria-atomic = "true" >
2017-07-04 01:09:28 +02:00
< div class = "toast-header" >
2019-01-08 17:33:28 +01:00
{{< placeholder width = "20" height = "20" background = "#007aff" class = "rounded mr-2" text = "false" title = "false" > }}
2017-07-04 01:09:28 +02:00
< strong class = "mr-auto" > Bootstrap< / strong >
< small > 11 mins ago< / small >
2020-09-14 04:47:05 +02:00
< button type = "button" class = "btn-close" data-dismiss = "toast" aria-label = "Close" > < / button >
2017-07-04 01:09:28 +02:00
< / div >
< div class = "toast-body" >
Hello, world! This is a toast message.
< / div >
< / div >
2019-01-08 17:33:28 +01:00
{{< / example > }}
2017-07-04 01:09:28 +02:00
2018-09-19 07:01:16 +02:00
### Translucent
Toasts are slightly translucent, too, so they blend over whatever they might appear over. For browsers that support the `backdrop-filter` CSS property, we'll also attempt to blur the elements under a toast.
2017-07-04 01:09:28 +02:00
2019-01-08 17:33:28 +01:00
{{< example class = "bg-dark" > }}
2018-08-31 09:18:28 +02:00
< div class = "toast" role = "alert" aria-live = "assertive" aria-atomic = "true" >
2017-07-04 01:09:28 +02:00
< div class = "toast-header" >
2019-01-08 17:33:28 +01:00
{{< placeholder width = "20" height = "20" background = "#007aff" class = "rounded mr-2" text = "false" title = "false" > }}
2017-07-04 01:09:28 +02:00
< strong class = "mr-auto" > Bootstrap< / strong >
< small class = "text-muted" > 11 mins ago< / small >
2020-09-14 04:47:05 +02:00
< button type = "button" class = "btn-close" data-dismiss = "toast" aria-label = "Close" > < / button >
2017-07-04 01:09:28 +02:00
< / div >
< div class = "toast-body" >
Hello, world! This is a toast message.
< / div >
< / div >
2019-01-08 17:33:28 +01:00
{{< / example > }}
2017-07-04 01:09:28 +02:00
2018-09-19 07:01:16 +02:00
### Stacking
2019-01-02 17:33:52 +01:00
When you have multiple toasts, we default to vertically stacking them in a readable manner.
2017-07-04 01:09:28 +02:00
2019-01-08 17:33:28 +01:00
{{< example class = "bg-light" > }}
2018-08-31 09:18:28 +02:00
< div class = "toast" role = "alert" aria-live = "assertive" aria-atomic = "true" >
2017-07-04 01:09:28 +02:00
< div class = "toast-header" >
2019-01-08 17:33:28 +01:00
{{< placeholder width = "20" height = "20" background = "#007aff" class = "rounded mr-2" text = "false" title = "false" > }}
2017-07-04 01:09:28 +02:00
< strong class = "mr-auto" > Bootstrap< / strong >
< small class = "text-muted" > just now< / small >
2020-09-14 04:47:05 +02:00
< button type = "button" class = "btn-close" data-dismiss = "toast" aria-label = "Close" > < / button >
2017-07-04 01:09:28 +02:00
< / div >
< div class = "toast-body" >
See? Just like this.
< / div >
< / div >
2018-08-31 09:18:28 +02:00
< div class = "toast" role = "alert" aria-live = "assertive" aria-atomic = "true" >
2017-07-04 01:09:28 +02:00
< div class = "toast-header" >
2019-01-08 17:33:28 +01:00
{{< placeholder width = "20" height = "20" background = "#007aff" class = "rounded mr-2" text = "false" title = "false" > }}
2017-07-04 01:09:28 +02:00
< strong class = "mr-auto" > Bootstrap< / strong >
< small class = "text-muted" > 2 seconds ago< / small >
2020-09-14 04:47:05 +02:00
< button type = "button" class = "btn-close" data-dismiss = "toast" aria-label = "Close" > < / button >
2018-09-05 22:13:50 +02:00
< / div >
< div class = "toast-body" >
2018-09-19 07:01:16 +02:00
Heads up, toasts will stack automatically
2018-09-05 22:13:50 +02:00
< / div >
< / div >
2019-01-08 17:33:28 +01:00
{{< / example > }}
2018-09-05 22:13:50 +02:00
2020-06-18 19:27:42 +02:00
### Custom content
2020-06-28 20:05:52 +02:00
Customize your toasts by removing sub-components, tweaking with [utilities ]({{< docsref "/utilities/api" >}} ), or adding your own markup. Here we've created a simpler toast by removing the default `.toast-header` , adding a custom hide icon from [Bootstrap Icons ]({{< param icons >}} ), and using some [flexbox utilities ]({{< docsref "/utilities/flex" >}} ) to adjust the layout.
2020-06-18 19:27:42 +02:00
{{< example class = "bg-light" > }}
2020-09-14 04:47:05 +02:00
< div class = "toast d-flex align-items-center" role = "alert" aria-live = "assertive" aria-atomic = "true" >
2020-06-18 19:27:42 +02:00
< div class = "toast-body" >
Hello, world! This is a toast message.
< / div >
2020-09-14 04:47:05 +02:00
< button type = "button" class = "btn-close ml-auto mr-2" data-dismiss = "toast" aria-label = "Close" > < / button >
2020-06-18 19:27:42 +02:00
< / div >
{{< / example > }}
Alternatively, you can also add additional controls and components to toasts.
{{< example class = "bg-light" > }}
< div class = "toast" role = "alert" aria-live = "assertive" aria-atomic = "true" >
< div class = "toast-body" >
Hello, world! This is a toast message.
< div class = "mt-2 pt-2 border-top" >
< button type = "button" class = "btn btn-primary btn-sm" > Take action< / button >
< button type = "button" class = "btn btn-secondary btn-sm" data-dismiss = "toast" > Close< / button >
< / div >
< / div >
< / div >
{{< / example > }}
### Color schemes
Building on the above example, you can create different toast color schemes with our [color utilities ]({{< docsref "/utilities/colors" >}} ). Here we've added `.bg-primary` and `.text-white` to the `.toast` , and then added `.text-white` to our close button. For a crisp edge, we remove the default border with `.border-0` .
{{< example class = "bg-light" > }}
2020-09-14 04:47:05 +02:00
< div class = "toast d-flex align-items-center text-white bg-primary border-0" role = "alert" aria-live = "assertive" aria-atomic = "true" >
2020-06-18 19:27:42 +02:00
< div class = "toast-body" >
Hello, world! This is a toast message.
< / div >
2020-09-14 04:47:05 +02:00
< button type = "button" class = "btn-close btn-close-white ml-auto mr-2" data-dismiss = "toast" aria-label = "Close" > < / button >
2020-06-18 19:27:42 +02:00
< / div >
{{< / example > }}
2017-07-04 01:09:28 +02:00
## Placement
2018-09-19 07:01:16 +02:00
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` .
2017-07-04 01:09:28 +02:00
2019-01-08 17:33:28 +01:00
{{< example class = "bg-dark" > }}
2018-09-19 07:01:16 +02:00
< div aria-live = "polite" aria-atomic = "true" style = "position: relative; min-height: 200px;" >
2017-07-04 01:09:28 +02:00
< div class = "toast" style = "position: absolute; top: 0; right: 0;" >
< div class = "toast-header" >
2019-01-08 17:33:28 +01:00
{{< placeholder width = "20" height = "20" background = "#007aff" class = "rounded mr-2" text = "false" title = "false" > }}
2017-07-04 01:09:28 +02:00
< strong class = "mr-auto" > Bootstrap< / strong >
< small > 11 mins ago< / small >
2020-09-14 04:47:05 +02:00
< button type = "button" class = "btn-close" data-dismiss = "toast" aria-label = "Close" > < / button >
2017-07-04 01:09:28 +02:00
< / div >
< div class = "toast-body" >
Hello, world! This is a toast message.
< / div >
< / div >
< / div >
2019-01-08 17:33:28 +01:00
{{< / example > }}
2017-07-04 01:09:28 +02:00
For systems that generate more notifications, consider using a wrapping element so they can easily stack.
2019-01-08 17:33:28 +01:00
{{< example class = "bg-dark" > }}
2018-09-19 07:01:16 +02:00
< div aria-live = "polite" aria-atomic = "true" style = "position: relative; min-height: 200px;" >
2017-07-04 01:09:28 +02:00
<!-- Position it -->
< div style = "position: absolute; top: 0; right: 0;" >
<!-- Then put toasts within -->
2018-08-31 09:18:28 +02:00
< div class = "toast" role = "alert" aria-live = "assertive" aria-atomic = "true" >
2017-07-04 01:09:28 +02:00
< div class = "toast-header" >
2019-01-08 17:33:28 +01:00
{{< placeholder width = "20" height = "20" background = "#007aff" class = "rounded mr-2" text = "false" title = "false" > }}
2017-07-04 01:09:28 +02:00
< strong class = "mr-auto" > Bootstrap< / strong >
< small class = "text-muted" > just now< / small >
2020-09-14 04:47:05 +02:00
< button type = "button" class = "btn-close" data-dismiss = "toast" aria-label = "Close" > < / button >
2017-07-04 01:09:28 +02:00
< / div >
< div class = "toast-body" >
See? Just like this.
< / div >
< / div >
2018-08-31 09:18:28 +02:00
< div class = "toast" role = "alert" aria-live = "assertive" aria-atomic = "true" >
2017-07-04 01:09:28 +02:00
< div class = "toast-header" >
2019-01-08 17:33:28 +01:00
{{< placeholder width = "20" height = "20" background = "#007aff" class = "rounded mr-2" text = "false" title = "false" > }}
2017-07-04 01:09:28 +02:00
< strong class = "mr-auto" > Bootstrap< / strong >
< small class = "text-muted" > 2 seconds ago< / small >
2020-09-14 04:47:05 +02:00
< button type = "button" class = "btn-close" data-dismiss = "toast" aria-label = "Close" > < / button >
2017-07-04 01:09:28 +02:00
< / div >
< div class = "toast-body" >
Heads up, toasts will stack automatically
< / div >
< / div >
< / div >
< / div >
2019-01-08 17:33:28 +01:00
{{< / example > }}
2017-07-04 01:09:28 +02:00
2018-09-19 07:01:16 +02:00
You can also get fancy with flexbox utilities to align toasts horizontally and/or vertically.
2017-07-04 01:09:28 +02:00
2019-01-08 17:33:28 +01:00
{{< example class = "bg-dark" > }}
2018-09-19 07:01:16 +02:00
<!-- Flexbox container for aligning the toasts -->
< div aria-live = "polite" aria-atomic = "true" class = "d-flex justify-content-center align-items-center" style = "min-height: 200px;" >
2017-07-04 01:09:28 +02:00
2018-09-19 07:01:16 +02:00
<!-- Then put toasts within -->
< div class = "toast" role = "alert" aria-live = "assertive" aria-atomic = "true" >
< div class = "toast-header" >
2019-01-08 17:33:28 +01:00
{{< placeholder width = "20" height = "20" background = "#007aff" class = "rounded mr-2" text = "false" title = "false" > }}
2018-09-19 07:01:16 +02:00
< strong class = "mr-auto" > Bootstrap< / strong >
< small > 11 mins ago< / small >
2020-09-14 04:47:05 +02:00
< button type = "button" class = "btn-close" data-dismiss = "toast" aria-label = "Close" > < / button >
2018-09-19 07:01:16 +02:00
< / div >
< div class = "toast-body" >
Hello, world! This is a toast message.
2017-07-04 01:09:28 +02:00
< / div >
< / div >
< / div >
2019-01-08 17:33:28 +01:00
{{< / example > }}
2018-08-23 21:06:35 +02:00
2018-09-19 07:01:16 +02:00
## Accessibility
2019-02-04 11:22:02 +01:00
Toasts are intended to be small interruptions to your visitors or users, so to help those with screen readers and similar assistive technologies, you should wrap your toasts in an [`aria-live` region ](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions ). Changes to live regions (such as injecting/updating a toast component) are automatically announced by screen readers without needing to move the user's focus or otherwise interrupt the user. Additionally, include `aria-atomic="true"` to ensure that the entire toast is always announced as a single (atomic) unit, rather than announcing what was changed (which could lead to problems if you only update part of the toast's content, or if displaying the same toast content at a later point in time). If the information needed is important for the process, e.g. for a list of errors in a form, then use the [alert component ]({{< docsref "/components/alerts" >}} ) instead of toast.
2018-09-19 07:01:16 +02:00
Note that the live region needs to be present in the markup *before* the toast is generated or updated. If you dynamically generate both at the same time and inject them into the page, they will generally not be announced by assistive technologies.
You also need to adapt the `role` and `aria-live` level depending on the content. If it's an important message like an error, use `role="alert" aria-live="assertive"` , otherwise use `role="status" aria-live="polite"` attributes.
As the content you're displaying changes, be sure to update the [`delay` timeout ](#options ) to ensure people have enough time to read the toast.
2019-01-08 17:33:28 +01:00
{{< highlight html > }}
2018-09-19 07:01:16 +02:00
< div class = "toast" role = "alert" aria-live = "polite" aria-atomic = "true" data-delay = "10000" >
< div role = "alert" aria-live = "assertive" aria-atomic = "true" > ...< / div >
< / div >
2019-01-08 17:33:28 +01:00
{{< / highlight > }}
2018-09-19 07:01:16 +02:00
When using `autohide: false` , you must add a close button to allow users to dismiss the toast.
2019-01-08 17:33:28 +01:00
{{< example class = "bg-light" > }}
2018-09-19 07:01:16 +02:00
< div role = "alert" aria-live = "assertive" aria-atomic = "true" class = "toast" data-autohide = "false" >
< div class = "toast-header" >
2019-01-08 17:33:28 +01:00
{{< placeholder width = "20" height = "20" background = "#007aff" class = "rounded mr-2" text = "false" title = "false" > }}
2018-09-19 07:01:16 +02:00
< strong class = "mr-auto" > Bootstrap< / strong >
< small > 11 mins ago< / small >
2020-09-14 04:47:05 +02:00
< button type = "button" class = "btn-close" data-dismiss = "toast" aria-label = "Close" > < / button >
2018-09-19 07:01:16 +02:00
< / div >
< div class = "toast-body" >
Hello, world! This is a toast message.
< / div >
< / div >
2019-01-08 17:33:28 +01:00
{{< / example > }}
2018-09-19 07:01:16 +02:00
2018-08-23 21:06:35 +02:00
## JavaScript behavior
### Usage
Initialize toasts via JavaScript:
2019-01-08 17:33:28 +01:00
{{< highlight js > }}
2019-05-16 14:05:36 +02:00
var toastElList = [].slice.call(document.querySelectorAll('.toast'))
var toastList = toastElList.map(function (toastEl) {
return new bootstrap.Toast(toastEl, option)
})
2019-01-08 17:33:28 +01:00
{{< / highlight > }}
2018-08-23 21:06:35 +02:00
### Options
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-` , as in `data-animation=""` .
v5: Forms update (#28450)
* Initial spike of consolidated form checks
* Stub out forms rearrangement
- Prepping to drop non-custom file and range inputs
- Prepping to merge custom and native checks and radios (with switches)
- Prepping to merge custom select with form select
- Moving docs arround so forms has it's own area given volume of CSS
* Move input group Sass file to forms subdir
* Start to split and move the docs around
* Simpler imports
* Copyediting
* delete overview file
* Remove commented out code
* remove the custom-forms import
* rewrite flex-check as form-check, replace all custom properties
* Remove old forms doc
* stub out new subpage link section
* update migration guide
* Update nav, forms overview in page nav, and descriptions
* fix check bg position
* fix margin-top calculation
* rename .custom-select to .form-select
* Update validation styles for new checks
* add some vertical margin, fix inline checks
* fix docs examples
* better way to do this contents stuff, redo the toc while i'm at it
* page restyle for docs while here
* un-callout that, edit text
* redo padding on toc
* fix toc
* start to cleanup checks docs
* Rewrite Markdown tables into HTML
* Redesign tables, redo their docs
* Replace Open Iconic icons with custom Bootstrap icons
* Redesign the docs navbar, add a subheader, redo the sidebar
* Redesign docs homepage a bit
* Simplify table style overrides for docs tables
* Simplify docs typography for page titles and reading line length
* Stub out icons page
* Part of sidebar update, remove migration from nav.yml
* Move toc CSS to separate partial
* Change appearance of overview page
* fix sidebar arrow direction
* Add footer to docs layout
* Update descriptions
* Drop the .form-group class for margin utilities
* Remove lingering form-group-margin-bottom var
* improve footer spacing
* add headings to range page
* uncomment form range css
* Rename .custom-range to .form-range
* Drop unused docs var
* Uncomment the comment
* Remove unused variable
* Fix radio image sizing
* Reboot update: reset horizontal ul and ol padding
* de-dupe IDs
* tweak toc styles
* nvm, fix dropdown versions stuff
* remove sidebar nav toggle for now
* broken html
* fix more broken html, move css
* scss linting
* comment out broken helper docs
* scope styles
* scope styles
* Fixes #25540 and fixes #26407 for v5 only
* Update sidebar once more
* Match new sidenav order
* fix syntax error
* Rename custom-file to form-file, update paths, update migration docs for previous changes in #28696
* rename back
* fix size and alignment
* rename that back too
2019-07-12 23:52:33 +02:00
< table class = "table" >
2018-08-23 21:06:35 +02:00
< thead >
< tr >
< th style = "width: 100px;" > Name< / th >
< th style = "width: 100px;" > Type< / th >
< th style = "width: 50px;" > Default< / th >
< th > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2020-06-27 13:28:21 +02:00
< td > < code > animation< / code > < / td >
2018-08-23 21:06:35 +02:00
< td > boolean< / td >
2020-06-27 13:28:21 +02:00
< td > < code > true< / code > < / td >
2018-08-23 21:06:35 +02:00
< td > Apply a CSS fade transition to the toast< / td >
< / tr >
< tr >
2020-06-27 13:28:21 +02:00
< td > < code > autohide< / code > < / td >
2018-08-23 21:06:35 +02:00
< td > boolean< / td >
2020-06-27 13:28:21 +02:00
< td > < code > true< / code > < / td >
2018-08-23 21:06:35 +02:00
< td > Auto hide the toast< / td >
< / tr >
< tr >
2020-06-27 13:28:21 +02:00
< td > < code > delay< / code > < / td >
2018-09-18 14:37:40 +02:00
< td > number< / td >
2018-08-23 21:06:35 +02:00
< td >
2020-07-12 14:43:26 +02:00
< code > 5000< / code >
2018-08-23 21:06:35 +02:00
< / td >
2018-09-18 14:37:40 +02:00
< td > Delay hiding the toast (ms)< / td >
2018-08-23 21:06:35 +02:00
< / tr >
< / tbody >
< / table >
### Methods
2020-10-13 15:37:21 +02:00
{{< callout danger > }}
2019-01-08 17:33:28 +01:00
{{< partial " callout-danger-async-methods . md " > }}
2020-10-13 15:37:21 +02:00
{{< / callout > }}
2018-08-23 21:06:35 +02:00
2019-05-16 14:05:36 +02:00
#### show
2018-08-23 21:06:35 +02:00
Reveals an element's toast. **Returns to the caller before the toast has actually been shown** (i.e. before the `shown.bs.toast` event occurs).
You have to manually call this method, instead your toast won't show.
2019-05-16 14:05:36 +02:00
{{< highlight js > }}toast.show(){{< / highlight > }}
2018-08-23 21:06:35 +02:00
2019-05-16 14:05:36 +02:00
#### hide
2018-08-23 21:06:35 +02:00
Hides an element's toast. **Returns to the caller before the toast has actually been hidden** (i.e. before the `hidden.bs.toast` event occurs). You have to manually call this method if you made `autohide` to `false` .
2019-05-16 14:05:36 +02:00
{{< highlight js > }}toast.hide(){{< / highlight > }}
2018-08-23 21:06:35 +02:00
2019-05-16 14:05:36 +02:00
#### dispose
2018-08-23 21:06:35 +02:00
Hides an element's toast. Your toast will remain on the DOM but won't show anymore.
2019-05-16 14:05:36 +02:00
{{< highlight js > }}toast.dispose(){{< / highlight > }}
2018-08-23 21:06:35 +02:00
### Events
v5: Forms update (#28450)
* Initial spike of consolidated form checks
* Stub out forms rearrangement
- Prepping to drop non-custom file and range inputs
- Prepping to merge custom and native checks and radios (with switches)
- Prepping to merge custom select with form select
- Moving docs arround so forms has it's own area given volume of CSS
* Move input group Sass file to forms subdir
* Start to split and move the docs around
* Simpler imports
* Copyediting
* delete overview file
* Remove commented out code
* remove the custom-forms import
* rewrite flex-check as form-check, replace all custom properties
* Remove old forms doc
* stub out new subpage link section
* update migration guide
* Update nav, forms overview in page nav, and descriptions
* fix check bg position
* fix margin-top calculation
* rename .custom-select to .form-select
* Update validation styles for new checks
* add some vertical margin, fix inline checks
* fix docs examples
* better way to do this contents stuff, redo the toc while i'm at it
* page restyle for docs while here
* un-callout that, edit text
* redo padding on toc
* fix toc
* start to cleanup checks docs
* Rewrite Markdown tables into HTML
* Redesign tables, redo their docs
* Replace Open Iconic icons with custom Bootstrap icons
* Redesign the docs navbar, add a subheader, redo the sidebar
* Redesign docs homepage a bit
* Simplify table style overrides for docs tables
* Simplify docs typography for page titles and reading line length
* Stub out icons page
* Part of sidebar update, remove migration from nav.yml
* Move toc CSS to separate partial
* Change appearance of overview page
* fix sidebar arrow direction
* Add footer to docs layout
* Update descriptions
* Drop the .form-group class for margin utilities
* Remove lingering form-group-margin-bottom var
* improve footer spacing
* add headings to range page
* uncomment form range css
* Rename .custom-range to .form-range
* Drop unused docs var
* Uncomment the comment
* Remove unused variable
* Fix radio image sizing
* Reboot update: reset horizontal ul and ol padding
* de-dupe IDs
* tweak toc styles
* nvm, fix dropdown versions stuff
* remove sidebar nav toggle for now
* broken html
* fix more broken html, move css
* scss linting
* comment out broken helper docs
* scope styles
* scope styles
* Fixes #25540 and fixes #26407 for v5 only
* Update sidebar once more
* Match new sidenav order
* fix syntax error
* Rename custom-file to form-file, update paths, update migration docs for previous changes in #28696
* rename back
* fix size and alignment
* rename that back too
2019-07-12 23:52:33 +02:00
< table class = "table" >
2018-08-23 21:06:35 +02:00
< thead >
< tr >
v5: Forms update (#28450)
* Initial spike of consolidated form checks
* Stub out forms rearrangement
- Prepping to drop non-custom file and range inputs
- Prepping to merge custom and native checks and radios (with switches)
- Prepping to merge custom select with form select
- Moving docs arround so forms has it's own area given volume of CSS
* Move input group Sass file to forms subdir
* Start to split and move the docs around
* Simpler imports
* Copyediting
* delete overview file
* Remove commented out code
* remove the custom-forms import
* rewrite flex-check as form-check, replace all custom properties
* Remove old forms doc
* stub out new subpage link section
* update migration guide
* Update nav, forms overview in page nav, and descriptions
* fix check bg position
* fix margin-top calculation
* rename .custom-select to .form-select
* Update validation styles for new checks
* add some vertical margin, fix inline checks
* fix docs examples
* better way to do this contents stuff, redo the toc while i'm at it
* page restyle for docs while here
* un-callout that, edit text
* redo padding on toc
* fix toc
* start to cleanup checks docs
* Rewrite Markdown tables into HTML
* Redesign tables, redo their docs
* Replace Open Iconic icons with custom Bootstrap icons
* Redesign the docs navbar, add a subheader, redo the sidebar
* Redesign docs homepage a bit
* Simplify table style overrides for docs tables
* Simplify docs typography for page titles and reading line length
* Stub out icons page
* Part of sidebar update, remove migration from nav.yml
* Move toc CSS to separate partial
* Change appearance of overview page
* fix sidebar arrow direction
* Add footer to docs layout
* Update descriptions
* Drop the .form-group class for margin utilities
* Remove lingering form-group-margin-bottom var
* improve footer spacing
* add headings to range page
* uncomment form range css
* Rename .custom-range to .form-range
* Drop unused docs var
* Uncomment the comment
* Remove unused variable
* Fix radio image sizing
* Reboot update: reset horizontal ul and ol padding
* de-dupe IDs
* tweak toc styles
* nvm, fix dropdown versions stuff
* remove sidebar nav toggle for now
* broken html
* fix more broken html, move css
* scss linting
* comment out broken helper docs
* scope styles
* scope styles
* Fixes #25540 and fixes #26407 for v5 only
* Update sidebar once more
* Match new sidenav order
* fix syntax error
* Rename custom-file to form-file, update paths, update migration docs for previous changes in #28696
* rename back
* fix size and alignment
* rename that back too
2019-07-12 23:52:33 +02:00
< th style = "width: 150px;" > Event type< / th >
2018-08-23 21:06:35 +02:00
< th > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2020-06-27 13:28:21 +02:00
< td > < code > show.bs.toast< / code > < / td >
2018-08-23 21:06:35 +02:00
< td > This event fires immediately when the < code > show< / code > instance method is called.< / td >
< / tr >
< tr >
2020-06-27 13:28:21 +02:00
< td > < code > shown.bs.toast< / code > < / td >
2018-08-23 21:06:35 +02:00
< td > This event is fired when the toast has been made visible to the user.< / td >
< / tr >
< tr >
2020-06-27 13:28:21 +02:00
< td > < code > hide.bs.toast< / code > < / td >
2018-08-23 21:06:35 +02:00
< td > This event is fired immediately when the < code > hide< / code > instance method has been called.< / td >
< / tr >
< tr >
2020-06-27 13:28:21 +02:00
< td > < code > hidden.bs.toast< / code > < / td >
2018-08-23 21:06:35 +02:00
< td > This event is fired when the toast has finished being hidden from the user.< / td >
< / tr >
< / tbody >
< / table >
2019-01-08 17:33:28 +01:00
{{< highlight js > }}
2019-05-16 14:05:36 +02:00
var myToastEl = document.getElementById('myToast')
myToastEl.addEventListener('hidden.bs.toast', function () {
2019-02-10 21:25:51 +01:00
// do something...
2018-08-23 21:06:35 +02:00
})
2019-01-08 17:33:28 +01:00
{{< / highlight > }}