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

# navigationSplitViewColumnWidth(min:ideal:max:)

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

```
nonisolated func navigationSplitViewColumnWidth(min: CGFloat? = nil, ideal: CGFloat, max: CGFloat? = nil) -> some View
```

## Discussion

Apply this modifier to the content of a column in a
[`NavigationSplitView`](/documentation/SwiftUI/NavigationSplitView) to specify a preferred flexible width for the
column. Use [`navigationSplitViewColumnWidth(_:)`](/documentation/SwiftUI/View/navigationSplitViewColumnWidth(_:)) if you need to
specify a fixed 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)