Flowbite::Toast
Renders a toast notification element.
Usage
<%= render(Flowbite::Toast.new(message: "Something has happened!")) %>
Examples
Styles
Use these toast notification styles to show feedback messages to your users. Toast notifications appear with different colors and icons based on the style.
Dismissible
Control whether the toast can be dismissed with a close button.
Custom Styling
Add custom classes to the toast container.
API reference
Flowbite
In namespace
Constructor
def initialize(message:, dismissible: true, style: :default, class: nil, **options)
Parameters
class |
Array<String> | Additional CSS classes for the toast container. |
|---|---|---|
dismissible |
Boolean | Whether the toast can be dismissed (default: true). |
message |
String | The message to display in the toast. |
options |
Hash | Additional HTML options for the toast container. |
style |
Symbol | The color style of the toast (:default, :success, :danger, :warning). |
See also
Ruby API documentation forclass Flowbite::Toast