<!--
{
  "availability" : [
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextBlock/contentWidth",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextBlock(py)contentWidth"
  },
  "title" : "contentWidth"
}
-->

# contentWidth

The width of the text block.

```
var contentWidth: CGFloat { get }
```

## Discussion

This property interpreted according to the value type returned by [`contentWidthValueType`](/documentation/AppKit/NSTextBlock/contentWidthValueType).

---

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)