table

Provides a data table with Material 3 design, supporting core functionalities like sorting, filtering, column customization, conditional formatting, and paging integration. Features include drag-and-drop column reordering, multi-platform support, and extensive customization options.

Android JVMJVMKotlin/NativeWasmJS
GitHub stars40
Dependents0
LicenseApache License 2.0
Creation date10 months ago

Last activity4 days ago
Latest release2.1.1 (4 days ago)

Data Table for Compose Multiplatform (Material 3)

Maven Central

Compose Multiplatform data table with Material 3 look & feel. Includes a core table (table-core), a conditional formatting add‑on (table-format), and paging integration (table-paging).

Data Table Example

Documentation

Full documentation lives at https://white-wind-llc.github.io/table/Getting started · Guides · API reference · Live demo

Installation

Add the modules you need from Maven Central:

dependencies {
    implementation("ua.wwind.table-kmp:table-core:2.1.1")
    // optional
    implementation("ua.wwind.table-kmp:table-format:2.1.1")
    implementation("ua.wwind.table-kmp:table-paging:2.1.1")
}

Quick start

data class Person(val name: String, val age: Int)
enum class PersonField { Name, Age }

val columns = tableColumns<Person, PersonField, Unit> {
    column(PersonField.Name, valueOf = { it.name }) {
        header("Name")
        cell { person, _ -> Text(person.name) }
        sortable()
        filter(TableFilterType.TextTableFilter())
    }
    column(PersonField.Age, valueOf = { it.age }) {
        header("Age")
        cell { person, _ -> Text(person.age.toString()) }
        sortable()
    }
}

val state = rememberTableState(
    columns = columns.map { it.key },
    settings = TableSettings(stripedRows = true),
)

@Composable
fun PeopleTable(items: List<Person>) {
    Table(
        itemsCount = items.size,
        itemAt = { index -> items.getOrNull(index) },
        state = state,
        columns = columns,
    )
}

License

See LICENSE.

Android JVMJVMKotlin/NativeWasmJS
GitHub stars40
Dependents0
LicenseApache License 2.0
Creation date10 months ago

Last activity4 days ago
Latest release2.1.1 (4 days ago)

Data Table for Compose Multiplatform (Material 3)

Maven Central

Compose Multiplatform data table with Material 3 look & feel. Includes a core table (table-core), a conditional formatting add‑on (table-format), and paging integration (table-paging).

Data Table Example

Documentation

Full documentation lives at https://white-wind-llc.github.io/table/Getting started · Guides · API reference · Live demo

Installation

Add the modules you need from Maven Central:

dependencies {
    implementation("ua.wwind.table-kmp:table-core:2.1.1")
    // optional
    implementation("ua.wwind.table-kmp:table-format:2.1.1")
    implementation("ua.wwind.table-kmp:table-paging:2.1.1")
}

Quick start

data class Person(val name: String, val age: Int)
enum class PersonField { Name, Age }

val columns = tableColumns<Person, PersonField, Unit> {
    column(PersonField.Name, valueOf = { it.name }) {
        header("Name")
        cell { person, _ -> Text(person.name) }
        sortable()
        filter(TableFilterType.TextTableFilter())
    }
    column(PersonField.Age, valueOf = { it.age }) {
        header("Age")
        cell { person, _ -> Text(person.age.toString()) }
        sortable()
    }
}

val state = rememberTableState(
    columns = columns.map { it.key },
    settings = TableSettings(stripedRows = true),
)

@Composable
fun PeopleTable(items: List<Person>) {
    Table(
        itemsCount = items.size,
        itemAt = { index -> items.getOrNull(index) },
        state = state,
        columns = columns,
    )
}

License

See LICENSE.