---
title: preferredMaxLayoutWidth
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nstextfield/preferredmaxlayoutwidth
---

# preferredMaxLayoutWidth

The maximum width of the text field’s intrinsic content size.

## Declaration

```swift
var preferredMaxLayoutWidth: CGFloat { get set }
```

## Discussion

Discussion If the text field wraps, the intrinsic height is large enough to show the entire text contents at that width. The default value is 0, indicating no maximum preferred width.
