Skip to content

Android

Android installation

Add Stance for Android with Gradle, apply Theme.Stance, wrap your content in StanceTheme and use Material 3 components on brand.

Stance for Android is a Jetpack Compose library built on Material 3 for behaviour, semantics and accessibility, and themed with Stance tokens. It looks like Stance and behaves like Android.

  • minSdk 24, compileSdk 37, Kotlin 2.4, Compose BOM 2026.09.00.
  • Depends only on AndroidX, Compose and Material 3.
  • Version 0.1.0, in development and not yet published. The Maven destination and the com.bindshq group are still to be confirmed by Binds.
ArtifactContents
com.bindshq:stance-composeTheme, components, icons, accessibility helpers and View interop.
com.bindshq:stance-tokensGenerated design tokens. Pure Kotlin with no Android dependency.

Gradle

gradle/libs.versions.toml
[versions]
stance = "0.1.0"

[libraries]
stance-compose = { module = "com.bindshq:stance-compose", version.ref = "stance" }
app/build.gradle.kts
dependencies {
    implementation(libs.stance.compose)
}

Set up

Use Theme.Stance as the activity theme so the window shows the Stance canvas colour before Compose draws, then wrap your content in StanceTheme.

xml
<activity android:name=".MainActivity" android:theme="@style/Theme.Stance" />
kotlin
class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        enableEdgeToEdge()
        super.onCreate(savedInstanceState)
        setContent {
            var appearance by rememberStanceAppearance()
            StanceTheme(appearance = appearance) {
                StanceScaffold(topBar = { StanceTopAppBar("Templates") }) { padding ->
                    StanceButton("Save template", onClick = {}, modifier = Modifier.padding(padding))
                }
            }
        }
    }
}

Material 3 interop

StanceTheme also sets MaterialTheme from Stance tokens, so any Material 3 component inside it is on brand. Stance wraps a Material component only when it adds a Stance API such as semantic variants, sizes, or loading and error states. For everything else, use the Material component directly.