Skip to content

🎛 Simple SwiftUI ‘neumorphic’ button style

Notifications You must be signed in to change notification settings

hallee/neumorphic-style

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwiftUI Neumorphic Button Style

This is a SwiftUI ButtonStyle for styling buttons in a neumorphic style.

I wrote a blog post about it.

You can download this as an interactive Swift Playground.

Usage

import NeumorphicStyle

// ...

@Environment(\.colorScheme) private var colorScheme

var body: some View {
    Button("Hello world") { }
    	.buttonStyle(NeumorphicButtonStyle(colorScheme: colorScheme))
}

Installation

let package = Package(
    ...
    dependencies: [
        .package(url: "https://github.com/hallee/neumorphic-style", from: "0.0.1")
    ],
    ...
)