A shadcn/ui-inspired component library for Kotlin Multiplatform / Compose
Multiplatform — Android, iOS, Desktop, and Web from one commonMain source set. Token-based
theming and sealed variant systems, built on the experimental Compose Styles API. No Material
dependency, no icon-library dependency — every component is drawn from this library's own tokens.
70+ components across primitives, forms, overlays, data display, and AI Elements (chat UI) — see the component catalog for the full list with keywords, and Registry parity for how closely each tracks real shadcn/ui.
Published to Maven Central.
# gradle/libs.versions.toml
[versions]
shadcn-compose = "0.2.4"
[libraries]
shadcn-compose = { module = "io.github.ronjunevaldoz:shadcn-compose", version.ref = "shadcn-compose" }// build.gradle.kts
kotlin {
sourceSets {
commonMain.dependencies {
implementation(libs.shadcn.compose)
}
}
}Every file that references a component's style parameter needs an opt-in:
@file:OptIn(ExperimentalFoundationStyleApi::class)Every component in real shadcn/ui's base/* registry is implemented here, with a small set of
deliberate, documented exceptions — native-select, direction, data-table, and toast
(deprecated upstream in favor of sonner, implemented here as ShadcnToast). Full reasoning in
.claude/AGENTS.md; token/component-level verification
against real source in docs/shadcn-parity.md.
/shadcn/core— the published library (commonMainhas everyShadcn*component)./core— shared utilities used across the catalog app's targets./app/shared— the catalog/documentation app's shared UI./app/androidApp,/app/desktopApp,/app/webApp— catalog app platform entry points./app/iosApp— the iOS entry point; open in Xcode.
Requires JDK 21 (matches CI). Android SDK and Xcode only needed for those specific targets.
./gradlew build # build everything
./gradlew :app:desktopApp:run # run the catalog app (desktop)
./gradlew :shadcn:core:jvmTest # library tests + Roborazzi screenshots (JVM)
./gradlew :shadcn:core:allTests # library tests, all platforms
./gradlew ktlintCheck detekt lint # code quality (also run in CI)
./scripts/check_style_block_theme_reads.shSee docs/visual-testing.md for the screenshot-testing workflow
(recordRoborazziJvm/verifyRoborazziJvm) and docs/shadcn-parity.md for
how components are checked against real shadcn/ui source.
The curated emoji reaction set used by ShadcnEmojiText
(shadcn/core/src/commonMain/.../icons/emoji/) is derived from
Twemoji, licensed under
CC-BY 4.0. Copyright 2020 Twitter, Inc and other
contributors, graphics licensed under CC-BY 4.0.
Learn more about Kotlin Multiplatform, Compose Multiplatform, and the source of design truth, shadcn/ui.