Swiftpack.co -  globulus/swiftui-shake-gesture as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Detect shake gesture in SwiftUI!
.package(url: "https://github.com/globulus/swiftui-shake-gesture.git", from: "1.0.0")


Simply detect shake gestures in SwiftUI.



This component is distributed as a Swift package.

Sample usage

struct ShakeTest: View {
  @State private var text = "Shake me!"
  var body: some View {
      .onShake { // ADD THIS
        text = "Shaken at \(Date())"


Check out this recipe for in-depth description of the component and its code. Check out SwiftUIRecipes.com for more SwiftUI recipes!


Stars: 2
Last commit: 4 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API