Contents

navigationLinkIndicatorVisibility(_:)

Configures whether navigation links show a disclosure indicator.

Declaration

@MainActor @preconcurrency func navigationLinkIndicatorVisibility(_ visibility: Visibility) -> some View

Discussion

If you need to detect whether the navigation disclosure indicator should be shown for the current view, read the navigationLinkIndicatorVisibility environment value.

The following example hides the indicator for all links in the list. The indicator can be hidden for a specific link by placing the modifier on the NavigationLink itself.

struct NoIndicatorLink: View {
    var body: some View {
        NavigationStack {
            List {
                NavigationLink("See detail") {
                    Text("Detail view")
                }
            }
            .navigationLinkIndicatorVisibility(.hidden)
        }
    }
}