Notifications
Bottom-right status messages with bounded stacking and FIFO queueing.
Show a notification#
local toast = window:Notify({
Title = "Preferences saved", Description = "Your local profile was updated.",
Type = "Success", Duration = 4, Dismissible = true,
OnDismiss = function(reason, id) print("Dismissed:", reason, id) end,
})
Open full size ↗
Open full size ↗Arguments#
| Option | Type | Default | Meaning |
|---|---|---|---|
| Title | string | Required | Nonempty title. |
| Description | string | "" | Compact body text. |
| Icon | string | "" | Ready image URI; otherwise a type symbol is shown. |
| Type | Info | Success | Warning | Error | Info | Status styling. |
| Duration | finite number ≥ 0 | 4 | Seconds after entry; zero is persistent. |
| Dismissible | boolean | true | Show the close button; does not prohibit Dismiss(). |
| OnDismiss | function(reason, id)? | nil | Once after removal; errors protected. |
Handle methods#
| Member | Returns | Meaning |
|---|---|---|
| Id | string | Generated identifier, not a user option. |
| GetState() | string | Queued / Visible / Closing / Dismissed. |
| GetDismissReason() | string? | Reason once dismissed. |
| Dismiss(reason?) | self | Default reason programmatic; repeat calls harmless. |
local persistent = window:Notify({Title = "Working", Duration = 0})
-- Later:
persistent:Dismiss("completed")Placement and queue#
Cards stack upward from the bottom-right safe area with up to a 20px margin (reduced in very small viewports) and an 8px gap. Up to three are visible; short viewports can show fewer. New messages enter at the bottom. The FIFO holds up to 64 waiting messages; overflow produces a dismissed handle with reason overflow.
Entry uses 200ms fade and an 8px motion from the right. Exit uses 170ms fade and a 6px motion right. Duration starts after entry; queued messages do not have timers. Requeued cards after viewport shrink receive a full duration on redisplay.
Lifecycle#
Page changes keep notifications. Minimize, hide, input blocking and Destroy dismiss both visible and queued requests; restoration does not bring them back. Only the close button consumes pointer input, not a transparent full-screen card layer.
| Reason | Cause |
|---|---|
| timeout | Automatic timer. |
| manual | Close button. |
| programmatic | Default Dismiss(). |
| overflow | Queue capacity exceeded. |
| minimized / hidden / input_blocked / destroyed | Owner lifecycle; AttachWindow can report hidden/input_blocked. |
| Custom string | Provided to Dismiss(reason). |