<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/inspectorColumnWidth(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE20inspectorColumnWidthyQr14CoreFoundation7CGFloatVF"
  },
  "title" : "inspectorColumnWidth(_:)"
}
-->

# inspectorColumnWidth(_:)

Sets a fixed, preferred width for the inspector containing this view
when presented as a trailing column.

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

## Parameters

`width`

The preferred fixed width for the inspector if
presented as a trailing column.

## Discussion

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

The following example shows an editor interface with an inspector, which
when presented as a trailing-column, has a fixed width of 225
points. The example also uses [`interactiveDismissDisabled(_:)`](/documentation/SwiftUI/View/interactiveDismissDisabled(_:)) to
prevent the inspector from being collapsed by user action like dragging
a divider.

```
MyEditorView()
    .inspector {
        TextTraitsInspectorView()
            .inspectorColumnWidth(225)
            .interactiveDismissDisabled()
    }
```

> Note: A fixed width does not prevent the user collapsing the
> inspector on macOS. See ``doc://com.apple.SwiftUI/documentation/SwiftUI/View/interactiveDismissDisabled(_:)``.

---

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)