Skip to content

ronjunevaldoz/shadcn-compose

Repository files navigation

shadcn-compose

CI Kotlin Compose Multiplatform Platforms License

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.

Installation

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)

Registry parity

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.

Project structure

Development

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.sh

See 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.

License

Apache License 2.0.

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.

About

A shadcn/ui-inspired component library for Kotlin Multiplatform / Compose Multiplatform -- Android, iOS, Desktop, and Web from one commonMain source set. No Material dependency. Demo: https://ronjunevaldoz.github.io/shadcn-compose/

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages