<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/scrollIndicators(_:axes:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE16scrollIndicators_4axesQrAA25ScrollIndicatorVisibilityV_AA4AxisO3SetVtF"
  },
  "title" : "scrollIndicators(_:axes:)"
}
-->

# scrollIndicators(_:axes:)

Sets the visibility of scroll indicators within this view.

```
nonisolated func scrollIndicators(_ visibility: ScrollIndicatorVisibility, axes: Axis.Set = [.vertical, .horizontal]) -> some View
```

## Parameters

`visibility`

The visibility to apply to scrollable views.

`axes`

The axes of scrollable views that the visibility applies to.

## Return Value

A view with the specified scroll indicator visibility.

## Discussion

Use this modifier to hide or show scroll indicators on scrollable
content in views like a [`ScrollView`](/documentation/SwiftUI/ScrollView), [`List`](/documentation/SwiftUI/List), or [`TextEditor`](/documentation/SwiftUI/TextEditor).
This modifier applies the preferred visibility to any
scrollable content within a view hierarchy.

```
ScrollView {
    VStack(alignment: .leading) {
        ForEach(0..<100) {
            Text("Row \($0)")
        }
    }
}
.scrollIndicators(.hidden)
```

Use the [`hidden`](/documentation/SwiftUI/ScrollIndicatorVisibility/hidden) value to indicate that you
prefer that views never show scroll indicators along a given axis.
Use [`visible`](/documentation/SwiftUI/ScrollIndicatorVisibility/visible) when you prefer that
views show scroll indicators. Depending on platform conventions,
visible scroll indicators might only appear while scrolling. Pass
[`automatic`](/documentation/SwiftUI/ScrollIndicatorVisibility/automatic) to allow views to
decide whether or not to show their indicators.

---

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)