Introducing
About WindUI
Setup
LoadstringThemes
UI
WindowKey SystemTabDialogPopupNotificationTagTab Section
Elements
SectionButtonToggleSliderInputDropdownParagraphKeybindColorpickerCodeDividerSpaceImageGroup (deprecated)HStack & VStack
Advanced
ConfigsIcons

Toggle

Create toggle switches and checkboxes in WindUI

Toggle Element

Toggles are switch elements that represent binary states (on/off, true/false). They're ideal for enabling/disabling features.

local Toggle = Tab:Toggle({
    Title = "Enable Feature",
    Callback = function(state)
        print("Toggle state:", state)
    end
})

Toggle Parameters

NameDefault
: stringToggle
: string?nil
: string?nil
: boolean?false
: string?Toggle
: boolean?false
: string?nil
: function?nil

Toggle Functions

Name
()
()
()
()
()
()
()
()

Toggle Variants

Simple Toggle

Tab:Toggle({
    Title = "Feature Enabled",
    Value = false,
    Callback = function(state)
        print("Feature enabled:", state)
    end
})

Checkbox Style Toggle

Tab:Toggle({
    Title = "Accept Terms",
    Type = "Checkbox",
    Value = false,
    Callback = function(state)
        print("Terms accepted:", state)
    end
})

Toggle with Icon

Tab:Toggle({
    Title = "Enable Notifications",
    Icon = "bell",
    Value = true,
    Callback = function(state)
        print("Notifications:", state and "Enabled" or "Disabled")
    end
})

Locked Toggle

local PremiumToggle = Tab:Toggle({
    Title = "Premium Feature",
    Locked = true,
    Value = false,
    Callback = function(state)
        print("Premium feature:", state)
    end
})
  • Tab - Tab container
  • Dialog - Dialog/prompt system