---
title: Rectangle
framework: swiftui
role: symbol
role_heading: Structure
path: swiftui/rectangle
---

# Rectangle

A rectangular shape aligned inside the frame of the view containing it.

## Declaration

```swift
@frozen struct Rectangle
```

## Topics

### Creating a rectangle

- [init()](swiftui/rectangle/init().md)

## Relationships

### Conforms To

- [Animatable](swiftui/animatable.md)
- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Copyable](swift/copyable.md)
- [Escapable](swift/escapable.md)
- [InsettableShape](swiftui/insettableshape.md)
- [RoundedRectangularShape](swiftui/roundedrectangularshape.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [Shape](swiftui/shape.md)
- [View](swiftui/view.md)

## See Also

### Creating rectangular shapes

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