---
title: "roundedRectangle(radius:)"
framework: swiftui
role: symbol
role_heading: Type Method
path: "swiftui/buttonbordershape/roundedrectangle(radius:)"
---

# roundedRectangle(radius:)

A rounded rectangle shape.

## Declaration

```swift
static func roundedRectangle(radius: CGFloat) -> ButtonBorderShape
```

## Parameters

- `radius`: The corner radius of the rectangle.

## Discussion

Discussion Use the buttonBorderShape(_:) view modifier to apply the shape to bordered buttons within a view hierarchy. note: This has no effect on non-widget system buttons in macOS.

## See Also

### Getting border shapes

- [automatic](swiftui/buttonbordershape/automatic.md)
- [capsule](swiftui/buttonbordershape/capsule.md)
- [circle](swiftui/buttonbordershape/circle.md)
- [roundedRectangle](swiftui/buttonbordershape/roundedrectangle.md)
