Swiftpack.co - spacenation/swiftui-shapes as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by spacenation.
spacenation/swiftui-shapes 2.0.0-beta.1
:rocket: Collection of SwiftUI shapes
⭐️ 272
🕓 1 year ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/spacenation/swiftui-shapes.git", from: "2.0.0-beta.1")

SwiftUI Shapes

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)


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


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"),

Code Contributions

Feel free to contribute via fork/pull request to master branch. If you want to request a feature or report a bug please start a new issue.


Stars: 272
Last commit: 1 year ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Related Packages

Release Notes

Rounded Polygons
1 year ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics