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

# init(cornerSize:style:)

Creates a new rounded rectangle shape.

## Declaration

```swift
init(cornerSize: CGSize, style: RoundedCornerStyle = .continuous)
```

## Parameters

- `cornerSize`: The width and height of the rounded corners.
- `style`: The style of corners drawn by the shape.

## See Also

### Creating a rounded rectangle

- [init(cornerRadius:style:)](swiftui/roundedrectangle/init(cornerradius:style:).md)
