---
title: "minFrameWidth(withTitle:styleMask:)"
framework: appkit
role: symbol
role_heading: Type Method
path: "appkit/nswindow/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.

## Declaration

```swift
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 doc://com.apple.appkit/documentation/AppKit/NSWindow/StyleMask-swift.struct for a list of style mask values.

## Return Value

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

## See Also

### Getting Layout Information

- [contentRect(forFrameRect:styleMask:)](appkit/nswindow/contentrect(forframerect:stylemask:).md)
- [frameRect(forContentRect:styleMask:)](appkit/nswindow/framerect(forcontentrect:stylemask:).md)
- [contentRect(forFrameRect:)](appkit/nswindow/contentrect(forframerect:).md)
- [frameRect(forContentRect:)](appkit/nswindow/framerect(forcontentrect:).md)
