Swiftpack.co - reuschj/StrokedShape as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by reuschj.
reuschj/StrokedShape v1.0.3
A SwiftUI convenience wrapper to allow you to set both a foreground color and stroke for a shape.
⭐️ 1
🕓 31 weeks ago
.package(url: "https://github.com/reuschj/StrokedShape.git", from: "v1.0.3")


SwiftUI allows a Shape to have either a foreground color added or a stroke, but not both. The solution is easy, but somewhat cumbersome: give the shape a foreground color, then overlay an identical shape with a stroke.

This is a package to reduce this boilerplate of giving a shape both a foreground color and stroke.

    foreground: .blue,
    outlineColor: .black,
    outlineWidth: 1
) {


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

Release Notes

WatchOS Compatible
31 weeks ago
  • WatchOS compatiblity

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