{"id":19007651,"url":"https://github.com/razaghimahdi/card-drawer","last_synced_at":"2025-04-22T19:25:41.399Z","repository":{"id":168926361,"uuid":"622869758","full_name":"razaghimahdi/Card-Drawer","owner":"razaghimahdi","description":"CardDrawer is a library that allows developers to add a custom cool Drawer to their Jetpack Compose apps. ","archived":false,"fork":false,"pushed_at":"2023-05-24T07:10:44.000Z","size":2783,"stargazers_count":50,"open_issues_count":0,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-17T13:30:18.781Z","etag":null,"topics":["android","compose","drawer","jetpack","jetpack-compose","kotlin","modal-drawer","navigation","navigation-drawer"],"latest_commit_sha":null,"homepage":"https://github.com/razaghimahdi/Card-Drawer","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/razaghimahdi.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":"2023-04-03T08:24:57.000Z","updated_at":"2025-04-09T08:23:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"039c0cf8-d092-4e71-88a8-b5d241a0d577","html_url":"https://github.com/razaghimahdi/Card-Drawer","commit_stats":null,"previous_names":["razaghimahdi/card-drawer"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razaghimahdi%2FCard-Drawer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razaghimahdi%2FCard-Drawer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razaghimahdi%2FCard-Drawer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razaghimahdi%2FCard-Drawer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/razaghimahdi","download_url":"https://codeload.github.com/razaghimahdi/Card-Drawer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250307452,"owners_count":21409082,"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","compose","drawer","jetpack","jetpack-compose","kotlin","modal-drawer","navigation","navigation-drawer"],"created_at":"2024-11-08T18:38:59.649Z","updated_at":"2025-04-22T19:25:41.377Z","avatar_url":"https://github.com/razaghimahdi.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Card Drawer\n\n`CardDrawer` is a library that allows developers to add a custom cool Drawer to their Jetpack\nCompose apps. The library provides a customizable drawer that lets users select items.\n\n## Give a Star! ⭐\nIf you like or are using this project to learn or start your solution, please give it a star. Thanks!\n\n[![](https://jitpack.io/v/razaghimahdi/Card-Drawer.svg)](https://jitpack.io/#razaghimahdi/Card-Drawer)\n\n\n| Opened | Closed |\n| --- | --- |\n| \u003cimg src=\"screenshots/2.jpg\" width=\"300\"/\u003e | \u003cimg src=\"screenshots/1.jpg\" width=\"300\"/\u003e |\n\n\n\n## Quickstart\n\nHere's a quick example of how to use the library:\n\n1. Add the JitPack repository to your project-level build.gradle or settings.gradle file:\n\n```groovy\n    allprojects {\n    repositories {\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\n\n2. Add the library dependency to your app-level build.gradle file:\n\n```groovy\n    dependencies {\n    implementation 'com.github.razaghimahdi:Card-Drawer:1.0.0'\n} \n```\n\n3. Use the CardDrawer in your app:\n\n```kotlin\nval drawerState = rememberCardDrawerState(initialValue = CardDrawerValue.Closed)\nval coroutineScope = rememberCoroutineScope()\n\nCardDrawer(\n    drawerState = drawerState,\n    drawerContent = { DrawerContent(drawerState) }\n) {\n    MainScreen(drawerState)\n}\n\n// make it open\ncoroutineScope.launch { drawerState.open()}\n\n// make it close\ncoroutineScope.launch { drawerState.close()}\n\n```\n\n4. Customize CardDrawer:\n\n```Kotlin\nCardDrawer(\n    modifier = Modifier,\n    gesturesEnabled = true,\n    drawerBackgroundColor = MaterialTheme.colors.surface,\n    drawerContentColor = contentColorFor(drawerBackgroundColor),\n    contentCornerSize = 0.dp,\n    contentBackgroundColor = MaterialTheme.colors.surface,\n    drawerContent = { DrawerContent(drawerState) },\n    drawerState = drawerState\n) {\n    MainScreen(drawerState)\n}\n```\n\n## Example\n\nFor a more detailed example, check out\nthe [example app](https://github.com/razaghimahdi/CardDrawer/blob/master/app/src/main/java/com/razaghimahdi/fullnavigationdrawer/MainActivity.kt)\nincluded in the repository.\n\n## Parameter\n\nCardDrawer has this Parameters:\n| Parameter | Description |\n| --- | --- |\n| `drawerContent` | A Composable function that represents the content inside the drawer. |\n| `modifier` | An optional Modifier that can be used to apply additional styling or layout information to the drawer. |\n| `drawerState` | A CardDrawerState object that represents the state of the drawer (e.g. open, closed, partially open). |\n| `gesturesEnabled` | A Boolean value that determines whether or not the drawer can be interacted with via gestures (e.g. swipe to open/close). |\n| `drawerBackgroundColor` | A Color value that specifies the background color to be used for the drawer sheet. |\n| `drawerContentColor` | A Color value that specifies the color of the content to be used inside the drawer sheet. Defaults to the contentColorFor function applied to the drawerBackgroundColor. |\n| `contentCornerSize` | A Dp value that specifies the size of the shape of the content. |\n| `contentBackgroundColor` | A Color value that specifies the background color to be used for the content outside of the drawer. |\n| `content` | A Composable function that represents the content outside of the drawer. |\n\n\n## Screenshots\n\nhttps://user-images.githubusercontent.com/61207818/230716598-1f08fd4b-3fe4-4d4c-9b44-84174aae00a2.mp4\n\n\n## Contributing\n\nContributions are welcome! If you find a bug or would like to create a new feature, please submit a\npull request.\n\n## License\n\nThis library is licensed under the MIT License.\nSee [LICENSE.txt](https://github.com/razaghimahdi/CardDrawer/blob/master/LICENSE)\n\nDeveloped by Mahdi Razzaghi Ghaleh\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazaghimahdi%2Fcard-drawer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frazaghimahdi%2Fcard-drawer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazaghimahdi%2Fcard-drawer/lists"}