Toast
component, implemented in Ruby. Use it like any other matestack component in your apps, pages and components. It offers customizable options to simply achieve what is possible in bootstrap with this component. See below for more information about the possible options.bs_toast(*args, &block)
header
- Expects a string or a hash with icon
, icon_class
title
and subtitle
as possible keys, that should go inside the header componentbody
- Expects a string that should go inside toast's body componentimportant
- to adapt the role and aria-live level depending on the content. If it’s an important message like an error, use important: true
, otherwise use important: false
attributesdelay
- expect a number which will delay hiding the toast in msautohide
- If set true, toast component will automatically hideanimation
- If set true, css fade transition will be applied to the toastslots
- Using slots option to extend customization of your header
beyond the standard option:show_on
- Expects an event as string on which the toast will be showed calling bootstraps show
method.:hide_on
- Expects an event as string on which the toast will be hidden calling bootstraps hide
method.:dispose_on
- Expects an event as string on which the toast will be disposed calling bootstraps dispose
method.class
, attributes
or data
attributes to the toast component