---
title: "Shapes Components | Explore SwiftUI"
description: "The different SwiftUI shapes. Explore 1 SwiftUI shapes components with code examples for iOS, macOS, watchOS, tvOS, and visionOS."
canonical_url: "https://exploreswiftui.com/library/shapes"
meta:
  author: "Explore SwiftUI"
  "og:description": "The different SwiftUI shapes. Explore 1 SwiftUI shapes components with code examples for iOS, macOS, watchOS, tvOS, and visionOS."
  "og:image": "https://exploreswiftui.com/_og/d/c_Default%2Ctitle_Shapes%2BComponents%2Cdescription_Explore%2B1%2BSwiftUI%2Bcomponents%2Bvisually%2Cp_Ii9saWJyYXJ5L3NoYXBlcyI%2Cs_g7oPITcfPF_fYmqm.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Shapes Components | Explore SwiftUI"
  "twitter:description": "The different SwiftUI shapes. Explore 1 SwiftUI shapes components with code examples for iOS, macOS, watchOS, tvOS, and visionOS."
  "twitter:image": "https://exploreswiftui.com/_og/d/c_Default%2Ctitle_Shapes%2BComponents%2Cdescription_Explore%2B1%2BSwiftUI%2Bcomponents%2Bvisually%2Cp_Ii9saWJyYXJ5L3NoYXBlcyI%2Cs_g7oPITcfPF_fYmqm.png"
  "twitter:title": "Shapes Components | Explore SwiftUI"
---

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

# **Shapes Components**

The different SwiftUI shapes

1 component

![ContainerRelativeShape - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/98/variants/318?v=1790073478842&r=2&w=412&q=75&f=webp)

### **ContainerRelativeShape**

A shape that is replaced by an inset version of the current container shape. If no container shape was defined, is replaced by a rectangle

```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/shapes#webpage","@type":"WebPage","description":"The different SwiftUI shapes. Explore 1 SwiftUI shapes components with code examples for iOS, macOS, watchOS, tvOS, and visionOS.","name":"Shapes Components","url":"https://exploreswiftui.com/library/shapes","breadcrumb":{"@id":"https://exploreswiftui.com/library/shapes#breadcrumb"},"isPartOf":{"@id":"https://exploreswiftui.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://exploreswiftui.com/library/shapes"]}],"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/shapes#collectionpage","@type":"CollectionPage","description":"The different SwiftUI shapes. Explore 1 SwiftUI shapes components with code examples for iOS, macOS, watchOS, tvOS, and visionOS.","inLanguage":"en-US","name":"Shapes Components","url":"https://exploreswiftui.com/library/shapes","about":{"@type":"Thing","name":"SwiftUI"},"isPartOf":{"@id":"https://exploreswiftui.com/#website"}},{"@id":"https://exploreswiftui.com/library/shapes#/schema/item-list/1","@type":"ItemList","name":"Shapes Components","itemListElement":[{"@type":"ListItem","position":1,"name":"ContainerRelativeShape","url":"https://exploreswiftui.com/library/shapes/containerrelativeshape"}]},{"@id":"https://exploreswiftui.com/library/shapes#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://exploreswiftui.com","position":1},{"@type":"ListItem","name":"Shapes","item":"https://exploreswiftui.com/library/shapes","position":2}]},{"@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"}]}
```