---
title: RoundedRectangularShape
framework: swiftui
role: symbol
role_heading: Protocol
path: swiftui/roundedrectangularshape
---

# RoundedRectangularShape

A protocol of InsettableShape that describes a rounded rectangular shape.

## Declaration

```swift
protocol RoundedRectangularShape : InsettableShape
```

## Overview

Overview Conform your InsettableShape type to RoundedRectangularShape when your shape is a rounded rectangular with four corners and you want to expose information about the corners. For example, a custom triangle Shape is not fit for such conformance, while a custom rectangle Shape could benefit from providing the implementation, especially when the shape is used as a container shape in containerShape(_:) to achieve concentricity. System shapes like Rectangle, RoundedRectangle, UnevenRoundedRectangle, Capsule, and Circle already provide default implementation for this protocol.

## Topics

### Instance Methods

- [corners(in:)](swiftui/roundedrectangularshape/corners(in:).md)

### Type Aliases

- [RoundedRectangularShape.Corners](swiftui/roundedrectangularshape/corners.md)

## Relationships

### Inherits From

- [Animatable](swiftui/animatable.md)
- [InsettableShape](swiftui/insettableshape.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [Shape](swiftui/shape.md)
- [View](swiftui/view.md)

### Conforming Types

- [Capsule](swiftui/capsule.md)
- [Circle](swiftui/circle.md)
- [Rectangle](swiftui/rectangle.md)
- [RoundedRectangle](swiftui/roundedrectangle.md)
- [UnevenRoundedRectangle](swiftui/unevenroundedrectangle.md)

## See Also

### Creating rectangular shapes

- [Rectangle](swiftui/rectangle.md)
- [RoundedRectangle](swiftui/roundedrectangle.md)
- [RoundedCornerStyle](swiftui/roundedcornerstyle.md)
- [RoundedRectangularShapeCorners](swiftui/roundedrectangularshapecorners.md)
- [UnevenRoundedRectangle](swiftui/unevenroundedrectangle.md)
- [RectangleCornerRadii](swiftui/rectanglecornerradii.md)
- [RectangleCornerInsets](swiftui/rectanglecornerinsets.md)
- [ConcentricRectangle](swiftui/concentricrectangle.md)
