Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/hallee/neumorphic-style
- Owner: hallee
- Created: 2020-02-15T20:49:27.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-02-15T21:14:53.000Z (over 4 years ago)
- Last Synced: 2024-09-12T21:46:33.939Z (15 days 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: 4
- 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")
],
...
)
```