import{_ as s,o,c as a,Q as n}from"./chunks/framework.4313453f.js";const m=JSON.parse('{"title":"Dropdown","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"references/dropdown.md","filePath":"references/dropdown.md","lastUpdated":null}'),e={name:"references/dropdown.md"},t=n(`
Dropdowns are objects where the user can click on a button, which opens a list from which the user can choose an item.
| Property | Type | Description |
|---|---|---|
| opened | bool | Indicates if the dropdown list is currently visible |
| dropdownHeight | number | The maximum height of the dropdown list when opened |
| dropdownWidth | number | The width of the dropdown list |
The following example demonstrates how to create a Dropdown object:
local main = basalt.addFrame()
local myDropdown = main:addDropdown()
-- Adding items to the dropdown
myDropdown:setItems({"Option 1", "Option 2", "Option 3"})local main = basalt.addFrame()
local myDropdown = main:addDropdown()
-- Adding items to the dropdown
myDropdown:setItems({"Option 1", "Option 2", "Option 3"})