DropDownMenu
import { DropDownMenu } from "@material";export component Example inherits Window { width: 400px; height: 300px; background: transparent; DropDownMenu { width: 280px; height: parent.height; items: [ { text: "Copy" }, { text: "Cut" }, { text: "Paste" }, ]; }}
slint

A “DropDownMenu” that can be opened from a TextField. The selected menu item is displayed in that field.
Properties
Section titled “Properties”[struct MenuItem] default: a struct with all default values
MenuItem
This structure represents a MenuItem with an icon, text, trailing text, and enabled state.
icon
(image): The icon to display in the item.text
(string): The text to display in the item.trailing_text
(string): The trailing text to display in the item.enabled
(bool): Whether the item is enabled.
An array of menu items, each containing an icon, a text, and a trailing text.
enabled
Section titled “enabled”bool default: true
Whether the drop down menu is enabled and can be interacted with.
leading_icon
Section titled “leading_icon”image default: the empty image
An icon displayed at the beginning of the drop down menu.
string default: ""
The label text displayed above the drop down menu.
current_index
Section titled “current_index”int (in-out)
default: 0
The index of the currently selected menu item.
Callbacks
Section titled “Callbacks”selected(index: int)
Section titled “selected(index: int)”Invoked when a menu item is selected
© 2025 SixtyFPS GmbH