Instance Method

toolTip(_:)

Set the tooltip displayed when hovering over the menu item.

Declaration

func toolTip(_ toolTip: String) -> Self

Example


for file in folder {
    MenuItem(file.name)
        .onSelect { reveal(file) }
        // allow the user to read the full name even if it overflows
        .toolTip(file.name)
}

See Also

Behavior