---
title: "rect(uniformTrailingCorners:topLeadingCorner:bottomLeadingCorner:)"
framework: swiftui
role: symbol
role_heading: Type Method
path: "swiftui/shape/rect(uniformtrailingcorners:topleadingcorner:bottomleadingcorner:)"
---

# rect(uniformTrailingCorners:topLeadingCorner:bottomLeadingCorner:)

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

## Declaration

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

## Parameters

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

## Discussion

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

## See Also

### Creating a rectangle with uniform trailing corners

- [init(uniformTrailingCorners:topLeadingCorner:bottomLeadingCorner:)](swiftui/concentricrectangle/init(uniformtrailingcorners:topleadingcorner:bottomleadingcorner:).md)
