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: about 1 month ago
JSON representation
🎛 Simple SwiftUI ‘neumorphic’ button style
- Host: GitHub
- URL: https://github.com/hallee/neumorphic-style
- Owner: hallee
- Created: 2020-02-15T20:49:27.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-15T21:14:53.000Z (over 5 years ago)
- Last Synced: 2025-04-01T20:44:16.989Z (4 months ago)
- Topics: button, neumorphism, swift, swiftpm, swiftui, ui
- Language: Swift
- Homepage: https://blog.hal.codes/swiftui-neumorphism-button
- Size: 3.91 KB
- Stars: 68
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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")
],
...
)
```