<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 12.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/TableColumn/width(min:ideal:max:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI11TableColumnV5width3min5ideal3maxACyxq_q0_q1_G14CoreFoundation7CGFloatVSg_A2LtF"
  },
  "title" : "width(min:ideal:max:)"
}
-->

# width(min:ideal:max:)

Creates a resizable table column with the provided constraints.

```
nonisolated func width(min: CGFloat? = nil, ideal: CGFloat? = nil, max: CGFloat? = nil) -> TableColumn<RowValue, Sort, Content, Label>
```

## Parameters

`min`

The minimum width of a resizable column. If non-`nil`, the
value must be greater than or equal to `0`.

`ideal`

The ideal width of the column, used to determine the initial
width of the table column. The column always starts at least as
large as the set ideal size, but may be larger if table was sized
larger than the ideal of all of its columns.

`max`

The maximum width of a resizable column. If non-`nil`, the
value must be greater than `0`. Pass
<doc://com.apple.documentation/documentation/Swift/FloatingPoint/infinity>
to indicate unconstrained maximum width.

## Discussion

Always specify at least one width constraint when calling this method.
Pass `nil` or leave out a constraint to indicate no change to the
sizing of a column.

To create a fixed size column use [`width(_:)`](/documentation/SwiftUI/TableColumn/width(_:))
instead.

---

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)