<!--
{
  "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/Shape/rect(topLeadingCorner:topTrailingCorner:bottomLeadingCorner:bottomTrailingCorner:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI5ShapePA2A19ConcentricRectangleVRszrlE4rect16topLeadingCorner0g8TrailingI006bottomhI00kjI0AeA4EdgeO0I0O5StyleV_A3PtFZ"
  },
  "title" : "rect(topLeadingCorner:topTrailingCorner:bottomLeadingCorner:bottomTrailingCorner:)"
}
-->

# rect(topLeadingCorner:topTrailingCorner:bottomLeadingCorner:bottomTrailingCorner:)

Creates a rectangle with individual styles for each corner.

```
@export(implementation) static func rect(topLeadingCorner: Edge.Corner.Style, topTrailingCorner: Edge.Corner.Style, bottomLeadingCorner: Edge.Corner.Style, bottomTrailingCorner: Edge.Corner.Style) -> Self
```

## Parameters

`topLeadingCorner`

The top leading corner style.

`topTrailingCorner`

The top trailing corner style.

`bottomLeadingCorner`

The bottom leading corner style.

`bottomTrailingCorner`

The bottom trailing corner style.

---

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)