Cool ripple effect on you SwiftUI view.
Swift Package Manager:
https://github.com/Jnis/SwiftUIRippleEffect.git
import SwiftUIRippleEffect
var button1: some View {
VStack {
let rippleViewModel = RippleViewModel() // 1
Button(action: {
}, label: {
HStack {
Spacer()
Text("Title 1").padding()
Spacer()
}
.rippleTouchHandler(viewModel: rippleViewModel) // 2
})
.buttonStyle(EmptyStyle())
.background(
Capsule()
.foregroundColor(.yellow)
.rippleEffect(color: .gray,
rippleViewModel: rippleViewModel,
clipShape: Capsule()) // 3
)
}.padding()
}
You can find more examples inside /Examples
folder.
MIT
link |
Stars: 2 |
Last commit: 1 year ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics