---
title: "inspectorColumnWidth(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/inspectorcolumnwidth(_:)"
---

# inspectorColumnWidth(_:)

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

## Declaration

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

```

## Parameters

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

## Discussion

Discussion Apply this modifier on the content of a inspector(isPresented:content:) to specify a fixed preferred width for the trailing column. Use 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(_:) 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 interactiveDismissDisabled(_:).

## See Also

### Presenting an inspector

- [inspector(isPresented:content:)](swiftui/view/inspector(ispresented:content:).md)
- [inspectorColumnWidth(min:ideal:max:)](swiftui/view/inspectorcolumnwidth(min:ideal:max:).md)
