Skip to content

Import Carbon library

Prerequisites

Android

Carbon uses kotlinx.datetime for components working with time and dates. Therefore, if the project you are using Carbon with targets Android, you need to enable core library desugaring

Add Carbon to your dependencies

To start using Carbon in your Compose app, add the dependency according to your dependencies declaration method:

[versions]
carbon=<version>

[libraries]
carbon-compose = { module = "io.github.gabrieldrn:carbon", version.ref = "carbon" }
dependencies {
    implementation(libs.carbon.compose)
}

KMP:

kotlin {
    sourceSets {
        ...
        commonMain.dependencies {
            implementation(libs.carbon.compose)
        }
        ...
    }
}
dependencies {
    implementation("io.github.gabrieldrn:carbon:$version")
}
dependencies {
    implementation "io.github.gabrieldrn:carbon:$version"
}

You can find the latest version in the releases page.