<!--
{
  "availability" : [
    "iOS: 27.3.0 -",
    "iPadOS: 27.3.0 -",
    "macCatalyst: 27.3.0 -",
    "macOS: 27.3.0 -",
    "visionOS: 27.3.0 -",
    "watchOS: 27.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ScrollGestureAxisLock",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI21ScrollGestureAxisLockV"
  },
  "title" : "ScrollGestureAxisLock"
}
-->

# ScrollGestureAxisLock

Controls whether a scrollable view locks scroll gestures to one axis
during scrolling.

```
struct ScrollGestureAxisLock
```

## Overview

When a scrollable view scrolls along both axes, the system can lock each
scroll gesture to its predominant axis, so that a mostly vertical gesture
scrolls only vertically. Pass a value of this type to the
[`scrollGestureAxisLock(_:)`](/documentation/SwiftUI/View/scrollGestureAxisLock(_:)) modifier.

## Topics

### Type Properties

[`static var automatic: ScrollGestureAxisLock`](/documentation/SwiftUI/ScrollGestureAxisLock/automatic)

Uses the platform’s default behavior for locking scroll gestures.

[`static var directional: ScrollGestureAxisLock`](/documentation/SwiftUI/ScrollGestureAxisLock/directional)

Scroll gestures are locked to their predominant axis.

[`static var disabled: ScrollGestureAxisLock`](/documentation/SwiftUI/ScrollGestureAxisLock/disabled)

Scroll gestures can move along both axes at once.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)