<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/NavigationSplitView/init(preferredCompactColumn:sidebar:detail:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI19NavigationSplitViewV22preferredCompactColumn7sidebar6detailACyxAA05EmptyE0Vq0_GAA7BindingVyAA0cdeH0VG_xyXEq0_yXEtcAHRs_rlufc"
  },
  "title" : "init(preferredCompactColumn:sidebar:detail:)"
}
-->

# init(preferredCompactColumn:sidebar:detail:)

Creates a two-column navigation split view that enables programmatic
control over which column appears on top when the view collapses into a
single column in narrow sizes.

```
nonisolated init(preferredCompactColumn: Binding<NavigationSplitViewColumn>, @ContentBuilder sidebar: () -> Sidebar, @ContentBuilder detail: () -> Detail) where Content == EmptyView
```

## Parameters

`preferredCompactColumn`

A [`Binding`](/documentation/SwiftUI/Binding) to state that controls which
column appears on top when the view collapses.

`sidebar`

The view to show in the leading column.

`detail`

The view to show in the detail area.

---

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)