<!--
{
  "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/navigationSplitViewColumnWidth(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE015navigationSplitC11ColumnWidthyQr14CoreFoundation7CGFloatVF"
  },
  "title" : "navigationSplitViewColumnWidth(_:)"
}
-->

# navigationSplitViewColumnWidth(_:)

Sets a fixed, preferred width for the column containing this view.

```
nonisolated func navigationSplitViewColumnWidth(_ width: CGFloat) -> some View
```

## Discussion

Apply this modifier to the content of a column in a
[`NavigationSplitView`](/documentation/SwiftUI/NavigationSplitView) to specify a fixed preferred width for the
column. Use [`navigationSplitViewColumnWidth(min:ideal:max:)`](/documentation/SwiftUI/View/navigationSplitViewColumnWidth(min:ideal:max:)) if
you need to specify a flexible width.

The following example shows a three-column navigation split view where
the first column has a preferred width of 150 points, and the second
column has a flexible, preferred width between 150 and 400 points:

```
NavigationSplitView {
    MySidebar()
        .navigationSplitViewColumnWidth(150)
} contents: {
    MyContents()
        .navigationSplitViewColumnWidth(
            min: 150, ideal: 200, max: 400)
} detail: {
    MyDetail()
}
```

Only some platforms enable resizing columns. If
you specify a width that the current presentation environment doesn’t
support, SwiftUI may use a different width for your column.

---

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)