Contents

ersanq/swipekit

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

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)

Package Metadata

Repository: ersanq/swipekit

Default branch: main

README: README.md