<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/minFrameWidth(withTitle:styleMask:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWindow(cm)minFrameWidthWithTitle:styleMask:"
  },
  "title" : "minFrameWidth(withTitle:styleMask:)"
}
-->

# minFrameWidth(withTitle:styleMask:)

Returns the minimum width a window’s frame rectangle must have for it to display a title, with a given window style.

```
class func minFrameWidth(withTitle title: String, styleMask style: NSWindow.StyleMask) -> CGFloat
```

## Parameters

`title`

The title for the window.

`style`

The window style for the window. See [`NSWindow.StyleMask`](/documentation/AppKit/NSWindow/StyleMask-swift.struct) for a list of style mask values.

## Return Value

The minimum width of the window’s frame, using `style`, in order to display `title`.

---

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)