brampf / SUEShapes

SwiftUI Shapes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SUEShapes

SwiftUI Shapes

MIT License Swift 5.3

SUE stands for SwiftUI Extras and is a collection of small SwiftUI libraries for various recurring use cases

Gallery

HorizontalLine

HorizontalLine().stroke(lineWidth: 5).padding()

HorizontalLine

VerticalLine

VerticalLine().stroke(lineWidth: 5).padding()

VerticalLine

Stripes

Stripes().stroke(Color.black, lineWidth: 10).background(Color.yellow)

Stripes

RoundedCorners

HStack {
    VStack(spacing: 0) {
        RoundedCorners(hue: 0.2, part: .start)
        RoundedCorners(hue: 0.2, part: .middle)
        RoundedCorners(hue: 0.2, part: .middle)
        RoundedCorners(hue: 0.2, part: .middle)
        RoundedCorners(hue: 0.2, part: .middle)
        RoundedCorners(hue: 0.2, part: .end)
        Spacer()
    }
    VStack(spacing: 0) {
        RoundedCorners(hue: 0.4, part: .start, type: .dashed)
        RoundedCorners(hue: 0.4, part: .middle, type: .dashed)
        RoundedCorners(hue: 0.4, part: .middle, type: .dashed)
        RoundedCorners(hue: 0.4, part: .end, type: .dashed)
        Spacer()
    }
    VStack(spacing: 0) {
        RoundedCorners(hue: 0.6, part: .start, type: .regularOutline)
        RoundedCorners(hue: 0.6, part: .middle, type: .regularOutline)
        RoundedCorners(hue: 0.6, part: .middle, type: .regularOutline)
        RoundedCorners(hue: 0.6, part: .middle, type: .regularOutline)
        RoundedCorners(hue: 0.6, part: .middle, type: .regularOutline)
        RoundedCorners(hue: 0.6, part: .middle, type: .regularOutline)
        RoundedCorners(hue: 0.6, part: .end, type: .regularOutline)
        Spacer()
    }
    VStack(spacing: 0) {
        RoundedCorners(hue: 0.8, part: .start, type: .dashedOutline)
        RoundedCorners(hue: 0.8, part: .middle, type: .dashedOutline)
        RoundedCorners(hue: 0.8, part: .end, type: .dashedOutline)
        Spacer()
    }
    
    
}.padding()

RoundedCorners

License

MIT license; see LICENSE. (c) 2020

About

SwiftUI Shapes

License:MIT License


Languages

Language:Swift 100.0%