Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

Luminarlab/compose-cardstack

Repository files navigation

CardStack

Compose Version

Table of contents

Description

Use swipeable cards like Tinder Cards in Jetpack Compose. This project was originally forked from DavideC00 and changed to support the latest compose version and be more generic.

Overview

MainGif

Installation

Latest version: Download

Add the maven repo to your root build.gradle (If you haven't already)

allprojects {
    repositories {
       jcenter()
    }
}

Add the dependency:

dependencies {
    implementation 'com.luminarlab.ui:compose-cardstack:{latest_version}'
}

Usage

A simple use case

//EmptyStack() and CardContent() are custom composables and not included in the library
 CardStack(
                modifier = Modifier,
                items = items,
                empty = {
                    EmptyStack()
                },
                buttons = {
                    CardStackButtons()
                }
            ) { item, index ->
                SwipeableCard(index = index) {
                    CardContent(item = item)
                }
            }

See more in the example app

Contributing

Any contribution is appreciated

About

Use swipeable cards like Tinder Cards in Jetpack Compose.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages