Skip to content

ErsanQ/SwipeKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwipeKit

A smooth, Tinder-style card swipe library for SwiftUI. Swipe right to like, left to dislike, and more—with zero boilerplate.

SwipeKit Demo

Features

  • Zero Boilerplate: Add swipe gestures with .onSwipe { ... }.
  • CardStack Component: Manage stacks of cards with automatic depth and rotation.
  • Fluid Animations: Spring-based movements for a natural, native feel.
  • Customizable: Handle swipes in any direction (left, right, top, bottom).

Supported Platforms

  • iOS 14.0+
  • macOS 11.0+

Installation

.package(url: "https://github.com/ErsanQ/SwipeKit", from: "1.0.0")

Usage

Simple Swipe Modifier

Image("Profile")
    .onSwipe { direction in
        if direction == .right {
            print("Liked!")
        }
    }

Using CardStack

CardStack(items: $users) { user in
    UserCard(user: user)
} onSwipe: { user, direction in
    print("Swiped \(user.name) to \(direction)")
    // Logic to remove from array
}

Author

ErsanQ (Swift Package Index Community)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages