{"id":18242684,"url":"https://github.com/teddko/draggablecardstack","last_synced_at":"2025-04-04T11:30:32.458Z","repository":{"id":260029514,"uuid":"880093117","full_name":"TeddKo/DraggableCardStack","owner":"TeddKo","description":"A Jetpack🚀 Compose library📚 that provides a customizable draggable card stack with smooth animations and gestures.","archived":false,"fork":false,"pushed_at":"2024-11-04T09:57:35.000Z","size":250,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-20T10:21:50.412Z","etag":null,"topics":["android","cardstack","jetpack-compose","kotlin","kotlin-android"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TeddKo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-29T05:12:28.000Z","updated_at":"2025-03-07T09:03:35.000Z","dependencies_parsed_at":"2024-10-31T07:17:41.811Z","dependency_job_id":null,"html_url":"https://github.com/TeddKo/DraggableCardStack","commit_stats":null,"previous_names":["teddko/cardstack","teddko/draggablecardstack"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeddKo%2FDraggableCardStack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeddKo%2FDraggableCardStack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeddKo%2FDraggableCardStack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeddKo%2FDraggableCardStack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TeddKo","download_url":"https://codeload.github.com/TeddKo/DraggableCardStack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247169794,"owners_count":20895349,"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":["android","cardstack","jetpack-compose","kotlin","kotlin-android"],"created_at":"2024-11-05T07:07:32.321Z","updated_at":"2025-04-04T11:30:27.443Z","avatar_url":"https://github.com/TeddKo.png","language":"Kotlin","readme":"\u003ch1 align=\"center\"\u003eDraggable Card Stack\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://search.maven.org/artifact/io.github.teddko/cardstack\"\u003e\u003cimg alt=\"MavenCentral\" src=\"https://img.shields.io/maven-central/v/io.github.teddko/cardstack.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://android-arsenal.com/api?level=23\"\u003e\u003cimg alt=\"API\" src=\"https://img.shields.io/badge/API-23%2B-brightgreen.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://opensource.org/licenses/Apache-2.0\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\nA \u003cstrong\u003eJetpack Compose\u003c/strong\u003e library for customizable draggable card stacks with smooth animations.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/8fd29fb1-8a18-4ada-9b81-3a246239ba77\" width=\"320\" /\u003e\n\u003c/p\u003e\n\n## Features\n\n- 🎯 Smooth spring-based animations\n- 🔄 Vertical and horizontal swiping\n- 📱 Responsive design\n- 🎨 Customizable card alignment \u0026 spacing\n- 💫 Dynamic elevation \u0026 scale animations\n- ⚡ Velocity-based swipe detection\n- 🔄 Automatic card reordering\n\n## Installation\n```kotlin\ndependencies {\n    implementation(\"io.github.teddko:cardstack:1.0.1\")\n}\n```\n\n## Basic Usage\n```kotlin\n@Composable\nfun CardStackDemo() {\n    val items = remember { listOf(\"Card 1\", \"Card 2\", \"Card 3\") }\n\n    DraggableCardStack(\n        initialItems = items,\n        height = 200.dp,\n        cardSpacingRatio = 0.1f,\n        cardAlignment = CardAlignment.BOTTOM,\n        dragAlignment = DragAlignment.HORIZONTAL\n    ) { item -\u003e\n        Card(\n            modifier = Modifier\n                .fillMaxSize()\n                .padding(16.dp)\n        ) {\n            Text(\n                text = item,\n                modifier = Modifier.padding(16.dp)\n            )\n        }\n    }\n}\n```\n\n## Advanced Usage\n```kotlin\ndata class CardItem(\n    val title: String,\n    val description: String,\n    val imageUrl: String\n)\n\n@Composable\nfun AdvancedCardStack() {\n    val items = remember {\n        listOf(\n            CardItem(\"Title 1\", \"Description 1\", \"url1\"),\n            CardItem(\"Title 2\", \"Description 2\", \"url2\"),\n            CardItem(\"Title 3\", \"Description 3\", \"url3\")\n        )\n    }\n\n    DraggableCardStack(\n        initialItems = items,\n        height = 200.dp,\n        cardSpacingRatio = 0.1f,\n        cardAlignment = CardAlignment.BOTTOM,\n        dragAlignment = DragAlignment.HORIZONTAL\n    ) { item -\u003e\n        Card(modifier = Modifier.fillMaxSize()) {\n            Row(\n                modifier = Modifier\n                    .fillMaxSize()\n                    .padding(16.dp),\n                horizontalArrangement = Arrangement.spacedBy(16.dp),\n                verticalAlignment = Alignment.CenterVertically\n            ) {\n                AsyncImage(\n                    modifier = Modifier\n                        .size(100.dp)\n                        .clip(CircleShape),\n                    model = item.imageUrl,\n                    contentDescription = item.description,\n                    contentScale = ContentScale.Crop,\n                )\n                Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {\n                    Text(text = item.title)\n                    Text(text = item.description)\n                }\n            }\n        }\n    }\n}\n```\n\n## Customization\n### Card Alignment\n```kotlin\nCardAlignment.BOTTOM        // Bottom center\nCardAlignment.BOTTOM_START  // Bottom left\nCardAlignment.BOTTOM_END    // Bottom right\nCardAlignment.TOP          // Top center\nCardAlignment.TOP_START    // Top left\nCardAlignment.TOP_END      // Top right\nCardAlignment.START        // Center left\nCardAlignment.END          // Center right\n```\n\n### Drag Alignment\n```kotlin\nDragAlignment.VERTICAL    // Vertical only\nDragAlignment.HORIZONTAL  // Horizontal only\nDragAlignment.NONE       // All directions\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteddko%2Fdraggablecardstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteddko%2Fdraggablecardstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteddko%2Fdraggablecardstack/lists"}