A Compose Multiplatform component library
Browse the components, their props, and code snippets. Targets Android (API 24+), iOS (16.0+) and JVM/Desktop (Java 11+). Same token vocabulary as the Svelte library — switch platforms without learning a new system.
Install
Justin publishes com.davidhorn.justin:shared to the davidhorn Azure DevOps
Artifacts feed. Add the feed as a Maven repository, then depend on the artifact. Auth is a
Personal Access Token with Packaging (Read) scope, supplied via the azureArtifactsToken Gradle property (~/.gradle/gradle.properties) or
the AZURE_ARTIFACTS_TOKEN environment variable.
// settings.gradle.kts — add the Azure Artifacts feed
dependencyResolutionManagement {
repositories {
maven {
url = uri("https://pkgs.dev.azure.com/davidhorn/Packages/_packaging/shared/maven/v1")
credentials {
username = "AZURE_ARTIFACTS"
password = providers.gradleProperty("azureArtifactsToken").orNull
?: System.getenv("AZURE_ARTIFACTS_TOKEN")
?: error("Set azureArtifactsToken or AZURE_ARTIFACTS_TOKEN")
}
}
}
}
// build.gradle.kts of the consuming module — pin the version explicitly
commonMain.dependencies {
implementation("com.davidhorn.justin:shared:<version>")
}Usage
Wrap your composable tree in AppTheme once at the root. Every Justin composable then
picks up tokens, typography and light/dark mode automatically.
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.runtime.Composable
import com.davidhorn.justin.theme.AppTheme
import com.davidhorn.justin.components.button.DhButton
@Composable
fun App() {
AppTheme(darkTheme = isSystemInDarkTheme()) {
DhButton(text = "Save", onClick = { /* ... */ })
}
}