Components

Complete reference for all NexusUI components with examples and options.

Window

The main container for your UI. Create a window first, then add tabs and elements.

Create Window
local Window = NexusUI:CreateWindow({
    Title = "My Script Hub",
    SubTitle = "v1.0",
    Theme = "Dark",
    MinimizeKey = Enum.KeyCode.RightControl,
    Size = UDim2.new(0, 500, 0, 350),
    LogoId = "rbxassetid://123456789",
    Acrylic = true
})

Window Methods

Window:Minimize()           -- Minimize the window
Window:Maximize()           -- Restore the window
Window:Toggle()             -- Toggle visibility
Window:Destroy()            -- Destroy the window
Window:SetTheme("Cyberpunk") -- Change theme

Tab

Tabs organize your UI into different sections. Each tab can contain sections and elements.

Create Tab
local MainTab = Window:AddTab({
    Title = "Main",
    Icon = "home",           -- Lucide icon name
    Visible = true           -- Show/hide tab
})

Common Icons

Use any Lucide icon name: home, settings, user, shield, crosshair, eye, star, zap, etc.

Section

Sections group related elements within a tab.

Create Section
local Section = MainTab:AddSection("Feature Settings")

-- Add elements to section
Section:AddToggle({ ... })
Section:AddButton({ ... })

Button

Buttons trigger actions when clicked.

Basic Button
MainTab:AddButton({
    Title = "Click Me",
    Description = "Optional description",
    Icon = "play",           -- Optional icon
    Callback = function()
        print("Button clicked!")
    end
})
Double-Click Button
MainTab:AddButton({
    Title = "Dangerous Action",
    Description = "Double-click to confirm",
    DoubleClick = true,
    Callback = function()
        print("Confirmed!")
    end
})

Toggle

Toggles allow users to switch features on/off.

Basic Toggle
local MyToggle = MainTab:AddToggle({
    Title = "Enable Feature",
    Description = "Description of the feature",
    Default = false,
    Flag = "MyToggleFlag",    -- For config saving
    Callback = function(Value)
        print("Toggled: " .. tostring(Value))
    end
})

Toggle Methods

MyToggle:Set(true)          -- Set toggle value
MyToggle:GetValue()         -- Get current value
MyToggle:Lock()             -- Disable toggle
MyToggle:Unlock()           -- Enable toggle

Slider

Sliders allow users to select a number within a range.

Slider
local MySlider = MainTab:AddSlider({
    Title = "Walk Speed",
    Description = "Adjust player speed",
    Min = 16,
    Max = 100,
    Default = 16,
    Increment = 1,           -- Step size
    Suffix = " studs/s",     -- Display suffix
    Flag = "SpeedSlider",
    Callback = function(Value)
        local player = game.Players.LocalPlayer
        if player.Character then
            player.Character.Humanoid.WalkSpeed = Value
        end
    end
})

Slider Methods

MySlider:Set(50)            -- Set slider value
MySlider:GetValue()         -- Get current value
MySlider:Lock()             -- Disable slider
MySlider:Unlock()           -- Enable slider

Input

Text inputs allow users to enter text.

Text Input
local MyInput = MainTab:AddInput({
    Title = "Player Name",
    Description = "Enter player to teleport to",
    Placeholder = "Type name...",
    Default = "",
    MaxLength = 50,
    Flag = "PlayerInput",
    Finished = true,        -- Callback on Enter/FocusLost
    Callback = function(Value)
        print("Entered: " .. Value)
    end
})
Numeric Input
MainTab:AddInput({
    Title = "Amount",
    Placeholder = "Enter number",
    Numeric = true,         -- Only allow numbers
    Callback = function(Value)
        print("Number: " .. tonumber(Value))
    end
})

Keybind

Keybinds let users bind keyboard shortcuts to actions.

Toggle Keybind
local MyKeybind = MainTab:AddKeybind({
    Title = "Toggle Feature",
    Description = "Press to toggle",
    Default = Enum.KeyCode.X,
    Mode = "Toggle",         -- "Toggle", "Hold", or "Always"
    Flag = "FeatureKey",
    Callback = function(IsEnabled)
        print("Feature: " .. tostring(IsEnabled))
    end
})
Hold Keybind
MainTab:AddKeybind({
    Title = "Hold to Sprint",
    Default = Enum.KeyCode.LeftShift,
    Mode = "Hold",
    Callback = function(IsHolding)
        local player = game.Players.LocalPlayer
        if player.Character then
            player.Character.Humanoid.WalkSpeed = IsHolding and 50 or 16
        end
    end
})

ColorPicker

Color pickers allow users to select colors.

Color Picker
local MyColor = MainTab:AddColorPicker({
    Title = "ESP Color",
    Description = "Choose highlight color",
    Default = Color3.fromRGB(255, 0, 0),
    Transparency = 0,       -- Optional transparency slider
    Flag = "ESPColor",
    Callback = function(Color)
        print("Color: " .. tostring(Color))
    end,
    TransparencyCallback = function(Transparency)
        print("Transparency: " .. Transparency)
    end
})

ColorPicker Methods

MyColor:Set(Color3.fromRGB(0, 255, 0))
MyColor:GetColor()
MyColor:SetTransparency(0.5)

Paragraph

Paragraphs display static text content.

Paragraph
MainTab:AddParagraph({
    Title = "Welcome!",
    Content = [[This is a multi-line paragraph.
    
You can add any text here:
• Instructions
• Changelog
• Credits
• Warnings]]
})

Divider

Add visual separation between elements.

MainTab:AddDivider()