Browse documentation
Toasts
Confirm brief results without interrupting the user's workflow.
Import
Load the optional component layer before using the examples below.
Ruby
require "zaniah/ui"Variants
Use success, info, warning, or danger to match the message. A toast can be dismissed.
Rendered example

Ruby
Zaniah::UI::Toast.new("Saved", variant: :success)
API summary
Constructor options and behaviors are drawn from the component reference.
| Component | Constructor and methods | Variants or behavior |
|---|---|---|
Toast | (message, variant:, queue:); dismiss | info/success/warning/danger |
Accessibility
Toasts are live status messages. Put essential instructions somewhere persistent as well.
| Component | Semantic role |
|---|---|
Toast | live status |