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

# cornerRadius

The radius of the receiver’s corners when the receiver is a custom box with a simple line border.

```
var cornerRadius: CGFloat { get set }
```

## Discussion

The receiver’s corner radius. It must be a custom box—that is, it has a type of [`NSBox.BoxType.custom`](/documentation/AppKit/NSBox/BoxType-swift.enum/custom)—and it must have a border style of [`NSBorderType.lineBorder`](/documentation/AppKit/NSBorderType/lineBorder).

### Special Considerations

Functional only when the receiver’s box type ([`boxType`](/documentation/AppKit/NSBox/boxType-swift.property)) is `NSBoxCustom` and its border type ([`borderType`](/documentation/AppKit/NSBox/borderType)) is `NSLineBorder`.

---

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)