---
title: "init(cornerRadius:style:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/roundedrectangle/init(cornerradius:style:)"
---

# init(cornerRadius:style:)

Creates a new rounded rectangle shape.

## Declaration

```swift
init(cornerRadius: CGFloat, style: RoundedCornerStyle = .continuous)
```

## Parameters

- `cornerRadius`: The radius of the rounded corners.
- `style`: The style of corners drawn by the shape.

## See Also

### Creating a rounded rectangle

- [init(cornerSize:style:)](swiftui/roundedrectangle/init(cornersize:style:).md)
