{"id":22724902,"url":"https://github.com/msusman1/compose-card-stack","last_synced_at":"2025-04-13T19:07:17.871Z","repository":{"id":182546748,"uuid":"668680855","full_name":"msusman1/compose-card-stack","owner":"msusman1","description":"Timber like Card Stack library for Compose","archived":false,"fork":false,"pushed_at":"2023-08-24T15:12:18.000Z","size":11547,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T09:46:05.236Z","etag":null,"topics":["cardstack","compose"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msusman1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-20T11:07:32.000Z","updated_at":"2024-11-17T03:44:35.000Z","dependencies_parsed_at":"2023-07-20T20:02:13.582Z","dependency_job_id":null,"html_url":"https://github.com/msusman1/compose-card-stack","commit_stats":null,"previous_names":["msusman1/compose-card-stack"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msusman1%2Fcompose-card-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msusman1%2Fcompose-card-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msusman1%2Fcompose-card-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msusman1%2Fcompose-card-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msusman1","download_url":"https://codeload.github.com/msusman1/compose-card-stack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248766733,"owners_count":21158301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cardstack","compose"],"created_at":"2024-12-10T15:08:14.495Z","updated_at":"2025-04-13T19:07:17.836Z","avatar_url":"https://github.com/msusman1.png","language":"Kotlin","readme":"![Logo](https://github.com/msusman1/compose-card-stack/blob/master/images/home_banner.png)\n\n# Compose Card Stack\n\n![Platform](http://img.shields.io/badge/platform-android-blue.svg?style=flat)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n![API](https://img.shields.io/badge/API-23%2B-blue.svg?style=flat)\n[![](https://jitpack.io/v/msusman1/compose-card-stack.svg)](https://jitpack.io/#msusman1/compose-card-stack)\n\n# Overview\nTimber like card stack library for Compose, motivation from CardStackView for android view(imperative UI).\n[CardStackView](https://github.com/yuyakaido/CardStackView)\n\n![Overview](https://github.com/msusman1/compose-card-stack/blob/master/images/overview.gif)\n\n# Installation\n\nTo get a Git project into your build:\n\nStep 1. Add the JitPack repository to your build file\n\nAdd it in your root build.gradle at the end of repositories:\n\n```groovy\n\tallprojects {\n\t\trepositories {\n\t\t\t...\n\t\t\tmaven { url 'https://jitpack.io' }\n\t\t}\n\t}\n```\n\nStep 2. Add the dependency\n\n```groovy\ndependencies { \n    implementation \"com.github.msusman1:compose-card-stack:1.0.1\"\n}\n```\n\n# Setup\n\n\n\n```kotlin\n    CardStack(\n        modifier = Modifier.padding(16.dp),\n        stackState = rememberStackState(),\n        cardElevation = 10.dp,\n        scaleRatio = 0.95f,\n        rotationMaxDegree = 15,\n        displacementThreshold = 60.dp,\n        animationDuration = Duration.NORMAL,\n        visibleCount = 3,\n        stackDirection = Direction.BottomAndRight,\n        swipeDirection = SwipeDirection.FREEDOM,\n        swipeMethod = SwipeMethod.AUTOMATIC_AND_MANUAL,\n        items = items,\n        onSwiped = { index -\u003e\n            Log.d(TAG, \"onSwiped index:$index \")\n        }\n    ) {\n        MyImageCard(item = it)  // your card Composable\n    }\n\n```\n\n# Features\n\n## Stack Direction\nCard stack direction [Default: Direction.Bottom]\n\n![Stack Direction](https://github.com/msusman1/compose-card-stack/blob/master/images/stack_direction.png)\n\n## Visibility Count\nNo of cards to be visible below the top card Range:(from = 0, to = items size ) [Default: 3]\n\n![Visibility Count](https://github.com/msusman1/compose-card-stack/blob/master/images/visibility_count.png)\n\n## Card Elevation\nDetermine how much portion of underline cards will be displayed [Default: 10]\n\n![Visibility Count](https://github.com/msusman1/compose-card-stack/blob/master/images/elevation.png)\n\n## Card Scale Ratio\nDetermine how much underline cards be scale down(from 0.0 to 1.0) value fo 0.95f means 90% of original size, [Default: 0.95]\n\n![Visibility Count](https://github.com/msusman1/compose-card-stack/blob/master/images/scale.png)\n\n## Displacement Thresh hold\nDisplacement thresh hold value in Dp to make the card swipe, [Default: 60.dp]\n\n  \n## Animation Duration  \nDuration of the card animation [Default:  Duration.NORMAL]\n\n## Maximum Rotation degree\nMaximum Degree at which card can rotate [Default: 20]\n\n## Swipe Direction\nDirection at which card can move [Default: SwipeDirection.FREEDOM]\n\n## Swipe Method\nSet swipe method either manual(through code) or automatic(through swipe) [Default: SwipeMethod.AUTOMATIC_AND_MANUAL]\n\n\n\u003cbr/\u003e\n\n## 👍 How to Contribute\n1. Fork it\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Add some feature')\n4. Push to the branch (git push origin my-new-feature)\n5. Create new Pull Request\n\n\u003cbr/\u003e\n\n# License\n\n```\nCopyright 2023 msusman1\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsusman1%2Fcompose-card-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsusman1%2Fcompose-card-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsusman1%2Fcompose-card-stack/lists"}