---
title: borderWidth
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsbox/borderwidth
---

# borderWidth

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

## Declaration

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

## Discussion

Discussion The receiver’s border width. It must be a custom box—that is, it has a type of NSBox.BoxType.custom—and it must have a border style of NSBorderType.lineBorder. Special Considerations Functional only when the receiver’s box type (boxType) is NSBoxCustom and its border type (borderType) is NSLineBorder.

## See Also

### Customizing

- [borderColor](appkit/nsbox/bordercolor.md)
- [cornerRadius](appkit/nsbox/cornerradius.md)
- [fillColor](appkit/nsbox/fillcolor.md)
