Dropdown Menu Label

Represents a Material UI styled label for a dropdown menu item.

Overview

Displays a label view for menu items in a dropdown menu. Use DropdownMenuLabel for consistent row cells in Dropdown Menu.

To you use the DropdownMenuLabel, initialize it with a system image and a title string to customize the label’s appearance.

Initializer

Creates a label with the given system image and title.

DropdownMenuLabel(_ systemImage: String, _ titleKey: String)

Properties

Property

Description

systemImage

The name of the system image to be displayed.

titleKey

The text to be displayed next to the image.

Example

DropdownMenu {
   DropdownMenuLabel(systemImage: "1.circle.fill", "Option 1")
   DropdownMenuLabel(systemImage: "2.circle.fill", "Option 2")
   DropdownMenuLabel(systemImage: "3.circle.fill", "Option 3")
}, label: {
   Image(systemName: "ellipsis.circle.fill")
}

Last updated