6 components for Jetpack Compose

The components Material 3 doesn't ship.

A date picker, wheel picker, OTP input, rating bar, timeline and color picker, built to feel like they always belonged in Material 3. They read your MaterialTheme, animate, and work with screen readers.

implementation("io.github.nameisjayant:compose-components:0.1.0")

Learn one, know them all

Every component is put together the same way, so the second one takes minutes.

Components

Each one has its own page with explanations, code you can copy and every parameter.

Installation

Three steps from an empty project to your first component.

  1. Add the dependency

    The library is published to Maven Central. Make sure mavenCentral() is in your repositories, then add:

    build.gradle.kts
    // build.gradle.kts
    dependencies {
        implementation("io.github.nameisjayant:compose-components:0.1.0")
    }
    Using a version catalog?
    libs.versions.toml
    [versions]
    composeComponents = "0.1.0"
    
    [libraries]
    compose-components = { group = "io.github.nameisjayant", name = "compose-components", version.ref = "composeComponents" }
    Kotlin
    implementation(libs.compose.components)
  2. Check the requirements

    Requirement
    minSdk24. Dates use the library's own CalendarDate, so you don't need core library desugaring
    ComposeMaterial 3 is brought in through the Compose BOM as an api dependency
    ImportsEverything lives under com.nameisjayant.components.<component>, e.g. com.nameisjayant.components.datepicker.*
  3. Drop in a component

    Here's the rating bar. Every component is imported from com.nameisjayant.components.<component>.

    ComposeRatingBar.kt
    var rating by rememberSaveable { mutableFloatStateOf(3f) }
    
    ComposeRatingBar(
        rating = rating,
        onRatingChange = { rating = it },
        onRatingChangeFinished = { viewModel.save(rating) },   // when the finger lifts
    )
    Read the getting started guide