logoWindUI Shiny

Notify with Buttons

Notification popup with optional action buttons.

Notify with Buttons

WindUI:Notify(config) creates a notification popup and returns a notification object.

Config

KeyTypeDefaultNotes
Titlestring"Notification"Notification title
Contentstring?nilBody text
Iconstring?nilOptional icon
IconThemedboolean?nilThemed icon coloring
Backgroundstring?nilImage source
BackgroundImageTransparencynumber?0Background image transparency
Durationnumber5Auto-close seconds
CanClosebooleantrueShows close button
Buttonstable[]{}Action buttons

Button Entry Config (Buttons = {...})

KeyTypeDefaultNotes
TitlestringrequiredButton text
Iconstring?nilOptional icon
Variantstring?nilButton variant
Callbackfunction?nilRuns on click
CloseOnClickbooleantrueAuto-close behavior

Notification Methods

MethodSignatureDescription
CloseNotification:Close()Closes and destroys notification

Full Example (Notify + Buttons)

local n = WindUI:Notify({
    Title = "Configuration Loaded",
    Content = "Choose an action below.",
    Icon = "bell",
    IconThemed = true,
    Background = "rbxassetid://0",
    BackgroundImageTransparency = 0.75,
    Duration = 12,
    CanClose = true,
    Buttons = {
        {
            Title = "Apply",
            Icon = "check",
            Variant = "Primary",
            CloseOnClick = false,
            Callback = function()
                print("Apply clicked")
            end,
        },
        {
            Title = "Dismiss",
            Icon = "x",
            Variant = "Secondary",
            CloseOnClick = true,
            Callback = function()
                print("Dismiss clicked")
            end,
        },
    },
})

task.delay(10, function()
    if n and not n.Closed then
        n:Close()
    end
end)

On this page