---
title: "rect(uniformTopCorners:bottomLeadingCorner:bottomTrailingCorner:)"
framework: swiftui
role: symbol
role_heading: Type Method
path: "swiftui/shape/rect(uniformtopcorners:bottomleadingcorner:bottomtrailingcorner:)"
---

# rect(uniformTopCorners:bottomLeadingCorner:bottomTrailingCorner:)

Creates a rectangle with a corner style uniformly set on the two top corners, and two other styles for the bottom two corners respectively.

## Declaration

```swift
static func rect(uniformTopCorners: Edge.Corner.Style, bottomLeadingCorner: Edge.Corner.Style, bottomTrailingCorner: Edge.Corner.Style) -> Self
```

## Parameters

- `uniformTopCorners`: The corner style to apply uniformly to the two top corners.
- `bottomLeadingCorner`: The bottom leading corner style.
- `bottomTrailingCorner`: The bottom trailing corner style.

## Discussion

Discussion For the two top corners, the system calculates the radius for each corner first. Then, it selects the largest radius and applies it to each top corner to achieve the symmetric look.

## See Also

### Creating a rectangle with uniform top corners

- [init(uniformTopCorners:bottomLeadingCorner:bottomTrailingCorner:)](swiftui/concentricrectangle/init(uniformtopcorners:bottomleadingcorner:bottomtrailingcorner:).md)
