---
title: "rect(uniformLeadingCorners:topTrailingCorner:bottomTrailingCorner:)"
framework: swiftui
role: symbol
role_heading: Type Method
path: "swiftui/shape/rect(uniformleadingcorners:toptrailingcorner:bottomtrailingcorner:)"
---

# rect(uniformLeadingCorners:topTrailingCorner:bottomTrailingCorner:)

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

## Declaration

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

## Parameters

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

## Discussion

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

## See Also

### Creating a rectangle with uniform leading corners

- [init(uniformLeadingCorners:topTrailingCorner:bottomTrailingCorner:)](swiftui/concentricrectangle/init(uniformleadingcorners:toptrailingcorner:bottomtrailingcorner:).md)
