<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/menuIndicator(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE13menuIndicatoryQrAA10VisibilityOF"
  },
  "title" : "menuIndicator(_:)"
}
-->

# menuIndicator(_:)

Sets the menu indicator visibility for controls within this view.

```
nonisolated func menuIndicator(_ visibility: Visibility) -> some View
```

## Parameters

`visibility`

The menu indicator visibility to apply.

## Discussion

Use this modifier to override the default menu indicator
visibility for controls in this view. For example, the code below
creates a menu without an indicator:

```
Menu {
    ForEach(history , id: \.self) { historyItem in
        Button(historyItem.title) {
            self.openURL(historyItem.url)
        }
    }
} label: {
    Label("Back", systemImage: "chevron.backward")
        .labelStyle(.iconOnly)
} primaryAction: {
    if let last = history.last {
        self.openURL(last.url)
    }
}
.menuIndicator(.hidden)
```

> Note: On tvOS, the standard button styles do not include a menu
> indicator, so this modifier will have no effect when using a
> built-in button style. You can implement an indicator in your
> own ``doc://com.apple.SwiftUI/documentation/SwiftUI/ButtonStyle`` implementation by checking the value of the
> `menuIndicatorVisibility` environment value.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)