Notifications

Toasts that stack, cap at five, and dismiss on a timer.

The smallest notification#

Luau
win:Notify({ Text = "Saved." })

Building it up#

Luau
win:Notify({
    Title = "Configuration",
    Text = "Your settings were saved.",
    Icon = "check",
    Duration = 4,
})
OptionTypeDefaultWhat it does
TextstringThe body of the toast. Omit it for a title-only notice.
Titlestring"Notice"The bolder first line.
IconstringAn icon shown alongside.
IconColorColor3accentColours the icon and the countdown line. Color3 only; a theme role name is ignored.
Durationnumber3Seconds on screen before it dismisses itself.

Toasts stack in the bottom-right corner, 280px wide. Notify returns the toast frame, or nil if the window has been destroyed.

The newest toast draws a countdown line along its bottom edge that drains over its Duration. Older toasts fade theirs out, so only one line is running at a time.

Signalling failure#

There is no separate error type; colour the icon:

Luau
win:Notify({
    Title = "Failed",
    Text = "Could not reach the server.",
    Icon = "triangle-alert",
    IconColor = Color3.fromRGB(232, 93, 93),
    Duration = 6,
})

Give failures a longer duration than successes.

Spamming them is safe#

The stack is capped at five. When a sixth arrives, the oldest is dismissed with its normal exit animation rather than destroyed outright. Each toast scales in as it arrives.

Change the cap with Ember.Configure. It is clamped to 1-12:

Luau
Ember.Configure({ Effects = { MaxToasts = 3 } })

With Effects = { Enabled = false } a toast appears and disappears with no animation, and still respects its Duration.

They follow the theme#

Notifications are painted from the same palette as everything else, including their burn-in gradient and spark particles. Switching theme repaints toasts already on screen.

Notification or Status?

A notification interrupts: something happened, look now. A Status sits still and shows the current state. Use a toast for a live counter and the user gets a stack of toasts to watch.