Skip to content

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.

[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.

bool default: true

Whether the drop down menu is enabled and can be interacted with.

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.

int (in-out) default: 0

The index of the currently selected menu item.

Invoked when a menu item is selected


© 2025 SixtyFPS GmbH