<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/RoundedRectangularShape",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI23RoundedRectangularShapeP"
  },
  "title" : "RoundedRectangularShape"
}
-->

# RoundedRectangularShape

A protocol of [`InsettableShape`](/documentation/SwiftUI/InsettableShape) that describes a rounded rectangular
shape.

```
protocol RoundedRectangularShape : InsettableShape
```

## Overview

Conform your [`InsettableShape`](/documentation/SwiftUI/InsettableShape) type to [`RoundedRectangularShape`](/documentation/SwiftUI/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`](/documentation/SwiftUI/Shape) is
not fit for such conformance, while a custom rectangle [`Shape`](/documentation/SwiftUI/Shape) could
benefit from providing the implementation, especially when the shape is used
as a container shape in
[`containerShape(_:)`](/documentation/SwiftUI/View/containerShape(_:)-3br47) to achieve
concentricity.

System shapes like [`Rectangle`](/documentation/SwiftUI/Rectangle), [`RoundedRectangle`](/documentation/SwiftUI/RoundedRectangle),
[`UnevenRoundedRectangle`](/documentation/SwiftUI/UnevenRoundedRectangle), [`Capsule`](/documentation/SwiftUI/Capsule), and [`Circle`](/documentation/SwiftUI/Circle) already provide
default implementation for this protocol.

## Relationships

### Inherits From

[`Animatable`](/documentation/SwiftUI/Animatable)

[`Shape`](/documentation/SwiftUI/Shape)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`View`](/documentation/SwiftUI/View)

[`Sendable`](/documentation/Swift/Sendable)

[`InsettableShape`](/documentation/SwiftUI/InsettableShape)

### Conforming Types

[`Rectangle`](/documentation/SwiftUI/Rectangle)

[`Capsule`](/documentation/SwiftUI/Capsule)

[`UnevenRoundedRectangle`](/documentation/SwiftUI/UnevenRoundedRectangle)

[`RoundedRectangle`](/documentation/SwiftUI/RoundedRectangle)

[`Circle`](/documentation/SwiftUI/Circle)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)