A Compose Multiplatform implementation of the Carbon Design System.
Supported platforms:
- Android
- iOS
- Desktop
Caution
This library is still under development and unofficial. Contributions are welcomed.
For testing purposes, this project provides a catalog app for supported targets.
As this is a KMP project, please follow those steps to setup your environment accordingly.
You can either run the app from the Android App run configuration in Android Studio, or compile an APK by executing the assemble task in a terminal:
./gradlew :catalog:assemble
To run the iOS catalog app, open the Xcode project located in <git repo>/iosCatalog
and run it (⌘R).
You can run the desktop version by executing the desktopRun
Gradle task in a terminal:
./gradlew :catalog:desktopRun -DmainClass=com.gabrieldrn.carbon.catalog.MainKt
The Carbon Compose libraries tries to stay simple and respect Carbon guidelines as much as possible. Its usage is similar to the Jepack Compose implementation of Material Design.
Note
A dedicated documentation website will be created.
Add the dependency to your build.gradle
file:
dependencies {
implementation("io.github.gabrieldrn:carbon:0.1.0")
}
Whatever you have an Android or a KMP project, this will import the library corresponding to the targeted platform.
To provide all resources (colors and typography) necessary to create a UI with Carbon, use the CarbonDesignSystem
root composable at the top of your Compose tree:
setContent {
CarbonDesignSystem {
// Your UI content
}
}
This will apply the IBM Plex type family to components + White and Grey 100 themes as the light and dark themes respectively, according to the current platform theme setting.
Warning
Only few components with limited implementations are available at the moment. If you seek documentation about a component, please read written KDoc in the source code until the dedicated documentation website is available.
- Themes
- White
- Grey100
- Typography (IBM Plex)
- Layering
- Button
- Checkbox
- Dropdown
- Loading
- Multi-select
- Progress bar
- Radio button
- Text input
- Toggle