Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Footagesus/WindUI/llms.txt

Use this file to discover all available pages before exploring further.

Add a dropdown to a tab by calling :Dropdown({...}). The returned object lets you select values and refresh the list programmatically.

Parameters

Title
string
Label displayed on the dropdown trigger row.
Desc
string
Secondary line of text rendered beneath the title.
Values
table
The list of options to display. Accepts three formats:Simple strings
Values = { "Option A", "Option B", "Option C" }
Object entries — each entry is a table with Title, and optionally Desc, Icon, Callback, and Locked.
Values = {
  { Title = "New file",  Desc = "Create a new file",  Icon = "file-plus",  Callback = function() end },
  { Title = "Copy link", Desc = "Copy the file link", Icon = "copy",       Callback = function() end },
}
Divider — inserts a visual separator between entries.
{ Type = "Divider" }
Value
string | number | table
The default selected value. Use the item string for simple lists, the item’s Title string for object lists, or an index number. Pass a table to pre-select multiple items when Multi = true.
Multi
boolean
default:"false"
When true, multiple items can be selected simultaneously. The callback receives a table of selected values.
AllowNone
boolean
default:"false"
When true, the user can deselect all items. Only relevant when Multi = true.
Flag
string
Identifier used by the config system to save and restore this element’s value between sessions.
Callback
function(value)
Called when the selection changes. For simple string lists, receives the selected string. For object lists, receives the selected object (or a table of objects when Multi = true).

Methods

Examples

Simple string list

Tab:Dropdown({
  Title = "No Multi Dropdown",
  Values = {
    "Привет",
    "Hello",
    "Сәлем",
    "Bonjour",
  },
  Value = 1,
  Callback = function(selectedValue)
    print("Selected:", selectedValue)
  end,
})

Multi-select with AllowNone

Tab:Dropdown({
  Title = "Multi Dropdown",
  Values = {
    "Привет",
    "Hello",
    "Сәлем",
    "Bonjour",
  },
  Value = nil,
  AllowNone = true,
  Multi = true,
  Callback = function(selectedValue)
    print("Selected:", selectedValue)
  end,
})

Advanced object values with icons and descriptions

Each entry is an object with its own Callback. This is useful for context-menu–style dropdowns where each item performs a distinct action.
Tab:Dropdown({
  Title = "Advanced Dropdown (example)",
  Values = {
    {
      Title = "New file",
      Desc = "Create a new file",
      Icon = "file-plus",
      Callback = function()
        print("Clicked 'New File'")
      end,
    },
    {
      Title = "Copy link",
      Desc = "Copy the file link",
      Icon = "copy",
      Callback = function()
        print("Clicked 'Copy link'")
      end,
    },
    {
      Title = "Edit file",
      Desc = "Allows you to edit the file",
      Icon = "file-pen",
      Callback = function()
        print("Clicked 'Edit file'")
      end,
    },
    {
      Type = "Divider",
    },
    {
      Title = "Delete file",
      Desc = "Permanently delete the file",
      Icon = "trash",
      Callback = function()
        print("Clicked 'Delete file'")
      end,
    },
  },
})

Locked items in an object list

Set Locked = true on individual entries to make them non-selectable.
Tab:Dropdown({
  Flag = "DropdownTest2",
  Title = "Advanced Dropdown 2",
  Values = {
    { Title = "Category A", Icon = "bird" },
    { Title = "Category B", Icon = "house" },
    { Title = "Category C", Icon = "droplet", Locked = true },
  },
  Value = "Category A",
  Multi = true,
  Callback = function(options)
    local titles = {}
    for _, v in ipairs(options) do
      table.insert(titles, v.Title)
    end
    print("Selected:", table.concat(titles, ", "))
  end,
})

Dynamic list with Refresh

Use :Refresh() to swap out the options list at runtime, and :Select() to reset the selection.
local dropdownA

local LargeListA = { "All", "Item A2", "Item A3" --[[ ... ]] }
local LargeListB = { "Data B1", "Data B2", "Data B3" }

Tab:Dropdown({
  Title = "Main Category",
  Values = { "All", "Other Option" },
  Value = "All",
  Callback = function(option)
    if dropdownA then
      task.spawn(function()
        if option == "All" then
          dropdownA:Refresh(LargeListA)
        else
          dropdownA:Refresh(LargeListB)
        end
        dropdownA:Select({ "All" })
      end)
    end
  end,
})

dropdownA = Tab:Dropdown({
  Title = "Target",
  Values = LargeListA,
  Multi = true,
  Value = { "All" },
  Callback = function(option) end,
})
Call :Refresh() and :Select() inside task.spawn when triggering them from another dropdown’s callback. This avoids re-entrancy issues with the menu rendering.

Build docs developers (and LLMs) love