Skip to content

FB16679936: In SwiftUI, it should be possible to have an item with a submenu be checked, meaning to mark a Menu in a Menu as checked (checkmark) #618

Open
@sindresorhus

Description

@sindresorhus
  • Date: 2025-03-01
  • Resolution: Open
  • Area: SwiftUI
  • OS: macOS 15.2
  • Type: Suggestion

Description

In AppKit, you can have a menu with submenus, and have the menu item that contains the submenu be checked. In SwiftUI, to have a menu item be checked we need to use Toggle or a Picker. This means, it’s impossible to get a menu item that is both checked and contains a submenu.

Use-case: I created a font picker using a Menu. Each item in the main menu is a font name. Some fonts have sub-types, which goes into a submenu, but I still want to show a checkmark for the main item, even if a subtype is checked too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions