import{_ as s,c as i,o as t,a4 as a}from"./chunks/framework.nQaBHiNx.js";const g=JSON.parse('{"title":"Dropdown","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"references/dropdown.md","filePath":"references/dropdown.md","lastUpdated":null}'),e={name:"references/dropdown.md"},n=a(`
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"})