SwiftUI Shapes
  • August 6, 2025

Collection of custom shapes

Regular Polygons

 

RegularPolygon(sides: 32)
RoundedRegularPolygon(sides: 6, radius: 20)

Lines and Curves


 

QuadCurve(unitPoints: [
UnitPoint(x: 0.1, y: 0.1),
UnitPoint(x: 0.5, y: 0.9),
UnitPoint(x: 0.9, y: 0.1)
])
.stroke(Color.blue, style: .init(lineWidth: 2, lineCap: .round))
.frame(height: 200)

Patterns


 

GridPattern(horizontalLines: 20, verticalLines: 40)
.stroke(Color.white.opacity(0.3), style: .init(lineWidth: 1, lineCap: .round))
.frame(height: 200)
.background(Color.blue)
.padding()

Install


 

Add Shapes to your project with Swift Package Manager

// swift-tools-version:5.3
import PackageDescription

let package = Package(
name: “YOUR_PROJECT”,
dependencies: [
.package(url: “https://github.com/spacenation/swiftui-shapes.git”, from: “1.1.0”),
]
)

GitHub


View Github

YOU MIGHT ALSO LIKE...
MijickPopups Hero

  Popups Alerts Resizable Sheets Banners

SwiftUI Tooltip

This package provides you with an easy way to show tooltips over any SwiftUI view, since Apple does not provide ...

SimpleToast for SwiftUI

SimpleToast is a simple, lightweight, flexible and easy to use library to show toasts / popup notifications inside iOS or ...

SSToastMessage

Create Toast Views with Minimal Effort in SwiftUI Using SSToastMessage. SSToastMessage enables you to effortlessly add toast notifications, alerts, and ...

ToastUI

A simple way to show toast in SwiftUI   Getting Started • Documentation • Change Log