{"id":20568609,"url":"https://github.com/sproctor/compose-data-table","last_synced_at":"2025-04-05T00:05:32.410Z","repository":{"id":164004106,"uuid":"638790475","full_name":"sproctor/compose-data-table","owner":"sproctor","description":"An implementation of the Material Design data table for Compose.","archived":false,"fork":false,"pushed_at":"2025-02-28T12:45:26.000Z","size":521,"stargazers_count":168,"open_issues_count":5,"forks_count":15,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-28T23:03:43.928Z","etag":null,"topics":["compose","compose-multiplatform","data-table","kotlin-multiplatform"],"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/sproctor.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-05-10T05:42:32.000Z","updated_at":"2025-03-27T14:32:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"5c1cfdfb-be94-4b61-bbac-5b907a1b12dc","html_url":"https://github.com/sproctor/compose-data-table","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sproctor%2Fcompose-data-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sproctor%2Fcompose-data-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sproctor%2Fcompose-data-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sproctor%2Fcompose-data-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sproctor","download_url":"https://codeload.github.com/sproctor/compose-data-table/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266562,"owners_count":20910836,"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":["compose","compose-multiplatform","data-table","kotlin-multiplatform"],"created_at":"2024-11-16T04:51:42.669Z","updated_at":"2025-04-05T00:05:32.384Z","avatar_url":"https://github.com/sproctor.png","language":"Kotlin","readme":"![Maven Central](https://img.shields.io/maven-central/v/com.seanproctor/data-table)\n\n# Compose Data Table\n\nThis library is an implementation of the [Material Design data table](https://m2.material.io/components/data-tables) for Compose.\n\nThe original code is derived from the implementation that was removed from Compose pre-1.0. The goal is to implement the entire Material Design spec for data tables.\n\n![screenshot](screenshot.png)\n\n## Getting started\n\nAdd the dependency to your gradle build file:\n\nNon-material version:\n\n```kotlin\nimplementation(\"com.seanproctor:data-table:\u003cVERSION\u003e\")\n```\n\nMaterial 3:\n\n```kotlin\nimplementation(\"com.seanproctor:data-table-material3:\u003cVERSION\u003e\")\n```\n\nDraw a table\n\n```kotlin\nvar selectedRow by remember { mutableStateOf\u003cInt?\u003e(null) }\nDataTable(\n    columns = listOf(\n        DataColumn {\n            Text(\"Header A\")\n        },\n        DataColumn {\n            Text(\"Header B\")\n        },\n        DataColumn(Alignment.CenterEnd) {\n            Text(\"Header C\")\n        },\n    )\n) {\n    row {\n        onClick = { selectedRow = 0 }\n        cell { Text(\"Cell A1\") }\n        cell { Text(\"Cell B1\") }\n        cell { Text(\"Cell C1\") }\n    }\n    row {\n        onClick = { selectedRow = 1 }\n        cell { Text(\"Cell A2\") }\n        cell { Text(\"Cell B2\") }\n        cell { Text(\"Cell C2\") }\n    }\n}\n```\n\nDraw a paginated table\n```kotlin\nPaginatedDataTable(\n    columns = listOf(\n        DataColumn {\n            Text(\"Column1\")\n        },\n        DataColumn {\n            Text(\"Column2\")\n        },\n        DataColumn {\n            Text(\"Column3\")\n        },\n    ),\n    state = rememberPaginatedDataTableState(5),\n) {\n    for (rowIndex in 0 until 100) {\n        row {\n            onClick = { println(\"Row clicked: $rowIndex\") }\n            cell {\n                Text(\"Row $rowIndex, column 1\")\n            }\n            cell {\n                Text(\"Row $rowIndex, column 2\")\n            }\n            cell {\n                Text(\"Row $rowIndex, column 3\")\n            }\n        }\n    }\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsproctor%2Fcompose-data-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsproctor%2Fcompose-data-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsproctor%2Fcompose-data-table/lists"}