---
title: "Uniform Concentric Rectangle | Explore SwiftUI"
description: "Create a rectangle with the same corner style set on four corners. Learn how to use Uniform Concentric Rectangle in SwiftUI with visual code examples."
canonical_url: "https://exploreswiftui.com/library/concentricrectangle/uniform-concentric-rectangle"
meta:
  author: "Explore SwiftUI"
  "og:description": "Create a rectangle with the same corner style set on four corners. Learn how to use Uniform Concentric Rectangle in SwiftUI with visual code examples."
  "og:image": "https://exploreswiftui.com/_og/d/c_Component%2Ctitle_Uniform%2BConcentric%2BRectangle%2Cdescription_Explore%2Bvisually%2Bwith%2Bcode%2Bexamples%2Ccategory_ConcentricRectangle%2Cprops_eyJwbGF0Zm9ybXMiOlsiaU9TIiwiaVBhZE9TIiwibWFjT1MiLCJ3YXRjaE9TIiwidHZPUyIsInZpc2lvbk9TIl19%2Cp_Ii9saWJyYXJ5L2NvbmNlbnRyaWNyZWN0YW5nbGUvdW5pZm9ybS1jb25jZW50cmljLXJlY3RhbmdsZSI%2Cs_w6SL0OyYUupGhVNI.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Uniform Concentric Rectangle | Explore SwiftUI"
  "twitter:description": "Create a rectangle with the same corner style set on four corners. Learn how to use Uniform Concentric Rectangle in SwiftUI with visual code examples."
  "twitter:image": "https://exploreswiftui.com/_og/d/c_Component%2Ctitle_Uniform%2BConcentric%2BRectangle%2Cdescription_Explore%2Bvisually%2Bwith%2Bcode%2Bexamples%2Ccategory_ConcentricRectangle%2Cprops_eyJwbGF0Zm9ybXMiOlsiaU9TIiwiaVBhZE9TIiwibWFjT1MiLCJ3YXRjaE9TIiwidHZPUyIsInZpc2lvbk9TIl19%2Cp_Ii9saWJyYXJ5L2NvbmNlbnRyaWNyZWN0YW5nbGUvdW5pZm9ybS1jb25jZW50cmljLXJlY3RhbmdsZSI%2Cs_w6SL0OyYUupGhVNI.png"
  "twitter:title": "Uniform Concentric Rectangle | Explore SwiftUI"
---

> Index of every page on this site: [llms.txt](https://exploreswiftui.com/llms.txt)

**Interactive previews**[ iPhone](https://exploreswiftui.com/iphone?element=154)

# **Uniform Concentric Rectangle**

Create a rectangle with the same corner style set on four corners.

![Uniform Concentric Rectangle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/154/variants/500?v=1790073478842&r=2&w=800&q=80&f=webp)

### **Platform Compatibility**

iOS 26.0+ iPadOS 26.0+ macOS 26.0+ watchOS 26.0+ tvOS 26.0+ visionOS 26.0+

### **Tags**

### **SwiftUI Code**

[ Docs](<https://developer.apple.com/documentation/swiftui/concentricrectangle/init(corners:isuniform:)>)

```
ZStack(alignment: .bottom) {
    // Respects the device frame's corner radius
    ConcentricRectangle(corners: .concentric, isUniform: true)
        .fill(Color.blue)
        .frame(height: 50)
        .frame(maxHeight: .infinity, alignment: .bottom)
        .padding(30)
        .ignoresSafeArea()

    ZStack {
        // Gets radius from parent rect
        ConcentricRectangle()
            .fill(.secondary)

        // Respects the parent rectangle's corner radius
        ConcentricRectangle(corners: .concentric, isUniform: true)
            .fill(.red)
            .frame(width: 200, height: 200)
            .padding([.trailing, .bottom])
    }
    .containerShape(
            .rect(cornerRadius: 42)
    )
    .frame(width: 250, height: 250)
        .padding(.bottom)
}
```

### **Found an issue or have a suggestion?**

Created: February 28, 2026Updated: February 28, 2026

![Connect Wizard](https://exploreswiftui.com/_ipx/f_webp&q_80&s_48x48/images/connect-wizard-icon.png)

**Connect Wizard**

**Unlock insights App Store Connect doesn’t show you.**

[** Get Started **](https://apps.apple.com/app/apple-store/id6747314580?pt=121213751&ct=Explore%20SwiftUI%20Banner&mt=8)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://exploreswiftui.com/#website","@type":"WebSite","description":"A visual library for SwiftUI APIs, components, and modifiers","inLanguage":"en-US","name":"Explore SwiftUI","url":"https://exploreswiftui.com/","publisher":{"@id":"https://exploreswiftui.com/#identity"}},{"@id":"https://exploreswiftui.com/library/concentricrectangle/uniform-concentric-rectangle#webpage","@type":"WebPage","dateModified":"2026-02-28T18:33:04.861Z","datePublished":"2026-02-28T18:33:04.861Z","description":"Create a rectangle with the same corner style set on four corners. Learn how to use Uniform Concentric Rectangle in SwiftUI with visual code examples.","name":"Uniform Concentric Rectangle","url":"https://exploreswiftui.com/library/concentricrectangle/uniform-concentric-rectangle","breadcrumb":{"@id":"https://exploreswiftui.com/library/concentricrectangle/uniform-concentric-rectangle#breadcrumb"},"isPartOf":{"@id":"https://exploreswiftui.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://exploreswiftui.com/library/concentricrectangle/uniform-concentric-rectangle"]}],"primaryImageOfPage":{"@id":"https://exploreswiftui.com/#logo"}},{"@id":"https://exploreswiftui.com/#identity","@type":"Organization","description":"A visual library for SwiftUI APIs, components, and modifiers","name":"Explore SwiftUI","url":"https://exploreswiftui.com","logo":{"@id":"https://exploreswiftui.com/#logo"},"sameAs":["https://x.com/Typ0genius","https://mastodon.social/@Typ0genius"]},{"@id":"https://exploreswiftui.com/library/concentricrectangle/uniform-concentric-rectangle#article","dateModified":"2026-02-28T18:33:04.861Z","datePublished":"2026-02-28T18:33:04.861Z","description":"Create a rectangle with the same corner style set on four corners. Learn how to use Uniform Concentric Rectangle in SwiftUI with visual code examples.","headline":"Uniform Concentric Rectangle","inLanguage":"en-US","name":"Uniform Concentric Rectangle","thumbnailUrl":"https://exploreswiftui.com/api/images/154/variants/500?v=1790073478842&r=2","url":"https://exploreswiftui.com/library/concentricrectangle/uniform-concentric-rectangle","@type":["Article","TechArticle"],"about":{"@type":"Thing","name":"SwiftUI"},"author":{"@id":"https://exploreswiftui.com/#identity"},"image":{"@id":"https://exploreswiftui.com/#/schema/image/1"},"isPartOf":{"@type":"WebSite","name":"Explore SwiftUI","url":"https://exploreswiftui.com"},"mainEntityOfPage":{"@id":"https://exploreswiftui.com/library/concentricrectangle/uniform-concentric-rectangle#webpage"},"publisher":{"@id":"https://exploreswiftui.com/#identity"}},{"@id":"https://exploreswiftui.com/library/concentricrectangle/uniform-concentric-rectangle#/schema/software-source-code/1","@type":"SoftwareSourceCode","codeRepository":"https://developer.apple.com/documentation/swiftui/concentricrectangle/init(corners:isuniform:)","codeSampleType":"full example","description":"Create a rectangle with the same corner style set on four corners. Learn how to use Uniform Concentric Rectangle in SwiftUI with visual code examples.","name":"Uniform Concentric Rectangle SwiftUI Example","programmingLanguage":"Swift","runtimePlatform":"SwiftUI","text":"ZStack(alignment: .bottom) {\n    // Respects the device frame's corner radius\n    ConcentricRectangle(corners: .concentric, isUniform: true)\n        .fill(Color.blue)\n        .frame(height: 50)\n        .frame(maxHeight: .infinity, alignment: .bottom)\n        .padding(30)\n        .ignoresSafeArea()\n\n    ZStack {\n        // Gets radius from parent rect\n        ConcentricRectangle()\n            .fill(.secondary)\n\n        // Respects the parent rectangle's corner radius\n        ConcentricRectangle(corners: .concentric, isUniform: true)\n            .fill(.red)\n            .frame(width: 200, height: 200)\n            .padding([.trailing, .bottom])\n    }\n    .containerShape(\n            .rect(cornerRadius: 42)\n    )\n    .frame(width: 250, height: 250)\n        .padding(.bottom)\n}","about":[{"@type":"Thing","name":"SwiftUI"},{"@type":"Thing","name":"ConcentricRectangle"},{"@type":"Thing","name":"Uniform Concentric Rectangle"}]},{"@id":"https://exploreswiftui.com/library/concentricrectangle/uniform-concentric-rectangle#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://exploreswiftui.com","position":1},{"@type":"ListItem","name":"ConcentricRectangle","item":"https://exploreswiftui.com/library/concentricrectangle","position":2},{"@type":"ListItem","name":"Uniform Concentric Rectangle","item":"https://exploreswiftui.com/library/concentricrectangle/uniform-concentric-rectangle","position":3}]},{"@id":"https://exploreswiftui.com/#logo","@type":"ImageObject","caption":"Explore SwiftUI","contentUrl":"https://exploreswiftui.com/apple-touch-icon.png","inLanguage":"en","url":"https://exploreswiftui.com/apple-touch-icon.png"},{"@id":"https://exploreswiftui.com/#/schema/image/1","@type":"ImageObject","contentUrl":"https://exploreswiftui.com/api/images/154/variants/500?v=1790073478842&r=2","inLanguage":"en","url":"https://exploreswiftui.com/api/images/154/variants/500?v=1790073478842&r=2"}]}
```