Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hallee/neumorphic-style

🎛 Simple SwiftUI ‘neumorphic’ button style
https://github.com/hallee/neumorphic-style

button neumorphism swift swiftpm swiftui ui

Last synced: 3 days ago
JSON representation

🎛 Simple SwiftUI ‘neumorphic’ button style

Awesome Lists containing this project

README

        

# SwiftUI Neumorphic Button Style

This is a SwiftUI `ButtonStyle` for styling buttons in a [neumorphic](https://dribbble.com/shots/8297803-Skeuomorph-Mobile-Banking-Continuation) style.

I wrote a [blog post](https://blog.hal.codes/swiftui-neumorphism-button) about it.

You can download this as an [interactive Swift Playground](https://s3.amazonaws.com/f.hal.codes/SwiftUI+Neumorphism.playgroundbook.zip).



## Usage

```swift
import NeumorphicStyle

// ...

@Environment(\.colorScheme) private var colorScheme

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

## Installation

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