class

Opal::UI::ToastManager

Inherits Reference < Object

Manages a collection of toast notifications and renders them over a target buffer.

Instance methods

add(title : String, message : String = "", level : Symbol = :info, duration_ms : Int64 = 4000_i64) : Toast
Source
any?
Source
clean_expired(now : Time::Instant = Time.instant) : Nil
Source
render_overlay(buffer : Buffer, position : Symbol = :top_right, now : Time::Instant = Time.instant) : Nil

Renders all active toasts stacked in the top-right corner of the buffer

Source
size
Source
toasts
Source