Skip to content
KinetixUI

Jetpack Compose

packages/ui-compose is the native Jetpack Compose implementation of KinetixUI — Kinetix* composables for 90 of the 109 React catalogue entries, on the same token contract as the web library: one for every React component (or a documented reason it isn't).

It's a standalone Gradle project inside this monorepo, not a pnpm/npm workspace package — there's no package.json, so it's invisible to pnpm install / Turborepo. It lives here for proximity to the token source it's built from.

Not on Maven Central yet. Consume it by cloning the repo at a pinned commit and copying the packages/ui-compose/ui module into your project, the same "own the code" model as the web CLI. A publication workflow (publish-compose.yml, staging to the Central Portal) exists but needs signing credentials and has not been used for a real release.

Package
com.kinetixui:ui-compose · stable package
Distribution
Not on Maven Central yet: build it from a repository checkout pinned to a commit.
Catalogue
90 of 109 catalogue entries. Browse components
Not implemented
19 entries, each with its reason on platform coverage.
Verification
Catalogue verified to experimental (the weakest component sets it). Components with test evidence: Interaction 9/90 · Accessibility 10/90 · RTL limited evidence (1/90) · Large text not yet verified. CI: native-compose.yml.
Tokens
Kotlin objects and dimens.xml: colors (light + dark), type styles, spacing, radius, motion How tokens reach Jetpack Compose

What differs from the React library#

  • Composables, written natively. State is caller-owned, and each file's doc comment states what it does not carry over from the React component.
  • Material 3 where it already does the job. Slider, calendar, toaster, carousel and sidebar are Material 3 components re-themed onto the token contract instead of hand-built, so they behave like the Android components your users know.
  • Scoped ports, stated. The sheet is bottom-only, the menus have no nested submenus, and the calendar and date picker have no range selection. Known gaps lists every one.
  • Distribution and evidence. You copy the module from a pinned checkout; it is not on Maven Central. CI compiles and lints the package on every change, and the evidence counts in the summary above say how much of the catalogue has behaviour, accessibility, RTL and large-text tests on top of that. There are no screenshot tests.

A first adoption path#

  1. Copy the module and register it from a commit you pin.
  2. Follow the steps to a first working screen.
  3. Apply your own colours with a custom theme.
  4. Check Known gaps for the components your screens need.

Setup#

KinetixUI for Compose is source-integrated: you copy the library module from a repository checkout into your app. There is no Maven Central dependency to add.

Before you start#

  • An Android app that already builds, using Gradle Kotlin DSL (.kts files) and android.useAndroidX=true in gradle.properties.
  • JDK 17 or newer and an Android SDK that Gradle can find.
  • Android Gradle Plugin 9.4.1, the Kotlin Compose compiler plugin 2.4.21 and compileSdk 37. These are the versions the module builds with and that the check below uses; other versions are not tested. That plugin version needs a Gradle 9 wrapper (the repository uses 9.8.1).

The ui module is com.android.library, namespace com.kinetixui.ui, minSdk 24. Its runtime dependencies are compose-bom, androidx.compose.ui, material3 and ui-tooling-preview; ui-tooling is debug-only.

1. Copy the module and register it#

There is no released version, so copy from a checkout pinned to a commit. From your project's root folder:

git clone https://github.com/zedalleys/kinetixui.git ../kinetixui
git -C ../kinetixui checkout <commit-sha>
cp -R ../kinetixui/packages/ui-compose/ui kinetixui-ui

Note the commit in your own repository (a line in your README or the commit message that adds the folder), so the next update knows where it started.

To update, read what changed first: git -C ../kinetixui log --oneline <commit-sha>..<newer-commit-sha> -- packages/ui-compose/ui. Then replace the whole folder rather than copying over it: cp -R onto an existing kinetixui-ui nests the new copy inside it as kinetixui-ui/ui, and copying file by file would leave behind files the newer commit deleted. Replacing it also deletes any edits you made inside kinetixui-ui, so the first two lines save them as a patch against the commit you copied (skip them if you changed nothing), and the last line puts them back:

git -C ../kinetixui checkout <commit-sha>
diff -ruN -x build -x .gradle ../kinetixui/packages/ui-compose/ui kinetixui-ui > kinetixui-local.patch
git -C ../kinetixui fetch
git -C ../kinetixui checkout <newer-commit-sha>
rm -rf kinetixui-ui
cp -R ../kinetixui/packages/ui-compose/ui kinetixui-ui
patch -p1 -d kinetixui-ui < kinetixui-local.patch

patch reports each edit it could not apply and saves it beside the file as a .rej; resolve those by hand, then delete the .rej and .orig files it leaves. Build, and commit the folder together with the new commit SHA.

That leaves packages/ui-compose/ui in your project as a folder named kinetixui-ui, next to your app folder. Register it:

// settings.gradle.kts: add to your existing settings
include(":kinetixui-ui")
project(":kinetixui-ui").projectDir = file("kinetixui-ui")

2. Declare the plugin versions#

The copied module applies its plugins without versions, so your root build script declares them:

// build.gradle.kts (root)
plugins {
    id("com.android.application") version "9.4.1" apply false
    id("com.android.library") version "9.4.1" apply false
    id("org.jetbrains.kotlin.plugin.compose") version "2.4.21" apply false
}

3. Add KinetixUI and Compose to your app module#

Your app module needs Compose enabled, the same compileSdk, and its own Compose dependencies. The KinetixUI module keeps material3 internal, so Text, Column and Modifier come from your app's dependencies, not from KinetixUI.

// app/build.gradle.kts: add to your app module
plugins {
    id("org.jetbrains.kotlin.plugin.compose")
}
 
android {
    compileSdk = 37
    buildFeatures { compose = true }
}
 
dependencies {
    implementation(project(":kinetixui-ui"))
    implementation(platform("androidx.compose:compose-bom:2026.09.00"))
    implementation("androidx.compose.material3:material3")
    implementation("androidx.activity:activity-compose:1.11.0")
}

First working screen#

4. Add the screen#

Add this file to your app module. KinetixTheme resolves every Kinetix* composable to the right light or dark token set; it defaults to isSystemInDarkTheme(), the same as the web "system" mode, and takes darkTheme = … to force one.

// FirstScreen.kt
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.semantics.clearAndSetSemantics
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.unit.dp
import com.kinetixui.ui.*
 
@Composable
fun FirstScreen() {
    KinetixTheme {
        var email by rememberSaveable { mutableStateOf("") }
        var submitted by rememberSaveable { mutableStateOf(false) }
        var updates by rememberSaveable { mutableStateOf(true) }
        val emailError = if (submitted && "@" !in email) "Enter an email address." else null
 
        Column(
            modifier = Modifier
                .fillMaxSize()
                .background(KinetixColorScheme.current.background)
                .padding(16.dp),
            verticalArrangement = Arrangement.spacedBy(16.dp),
        ) {
            KinetixField(invalid = emailError != null) {
                KinetixFieldLabel(text = "Email", modifier = Modifier.clearAndSetSemantics { })
                KinetixInput(value = email, onValueChange = { email = it }, isError = emailError != null, accessibleLabel = "Email")
                emailError?.let { KinetixFieldMessage(text = it) }
            }
            Row(
                modifier = Modifier.fillMaxWidth(),
                horizontalArrangement = Arrangement.SpaceBetween,
                verticalAlignment = Alignment.CenterVertically,
            ) {
                // KinetixSwitch has no label parameter: name the switch itself, and hide the
                // visible text from assistive technology so it is not read twice.
                KinetixLabel(text = "Product updates", modifier = Modifier.clearAndSetSemantics {})
                KinetixSwitch(
                    checked = updates,
                    onCheckedChange = { updates = it },
                    modifier = Modifier.semantics { contentDescription = "Product updates" },
                )
            }
            KinetixButton(onClick = { submitted = true }, variant = KinetixButtonVariant.Primary) {
                Text("Get started")
            }
        }
    }
}

5. Show it from your activity#

Call FirstScreen() from your launcher activity's setContent:

// MainActivity.kt
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
 
class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent { FirstScreen() }
    }
}

Add a package line matching your app to both files if your sources use one.

6. Run it#

Run the app from Android Studio, or build it with ./gradlew :app:assembleDebug. You should see an Email field, a Product updates switch that starts on, and a Get started button. Tapping Get started while the email has no @ shows "Enter an email address." under the field; typing an address clears it. While it shows, the same text is also the input's accessibility error, so assistive technology gets it on the field itself, not only as text below it. Tapping the switch turns it off.

These steps are checked on every Compose change: CI copies the module into a new app, applies the fenced code above exactly, builds the app, and runs the screen's behaviour in a Robolectric test on the JVM. That is not a test on a device or emulator.

Once that works

KinetixColorScheme.current exposes the active KinetixColors set if you need a token directly.

A custom theme#

KinetixTheme takes your own colour sets and still switches on the system setting:

KinetixTheme(
    light = AcmeTheme.light,
    dark = AcmeTheme.dark,
) {
    App()
}

You can write that pair by hand, change one role with LightKinetixColors.copy(action = …), or export one from a Create design:

npx @kinetixui/cli preset compose <KX1_…> -n AcmeTheme -o AcmeTheme.kt

Replace the value in angle brackets before running this.

That writes a Kotlin object with a light and a dark KinetixColors, built from the same resolved theme the workspace exports — see the CLI reference.

Or skip the terminal: Create's Export panel has a Jetpack Compose target that generates the same file in the browser. It names the roles below that Compose has no field for, rather than leaving them to be discovered here.

Colours only. KinetixColors is the whole themeable surface here: corner radius and elevation are generated constants that components reference directly (KinetixRadius.md), with no runtime theme to override. A Create design's radius and surface treatment therefore apply on the web and not in Compose, and the generated file says so in its own header. Two preset roles do not travel either: input and ring are colours a preset can override by hand, and KinetixColors has no field for them.

Separately — and not a Create limitation — tertiary-foreground is in the Kinetix token contract and in the SwiftUI theme, but KinetixColors has never exposed it. Create does not model that token at all, so no preset can set it.

A colour the design did not change is written as a reference to the shipped token rather than a copy of today's value, so it keeps following the library.

Tokens#

The Kotlin token objects and res/values/{colors,dimens}.xml under ui/src/main/kotlin/com/kinetixui/tokens/ are generated and vendored — copied from packages/tokens/dist/android/ by scripts/vendor-compose-tokens.mjs. Don't hand-edit them. After any token change:

pnpm build:tokens && pnpm vendor:compose

Every spacing / radius / type value in a component is read via dimensionResource(R.dimen.*) — nothing is a hand-picked number, unless a Figma value doesn't land on the shared scale (those are hardcoded with a comment).

What's covered#

One per ported React component — Button, Input, Dialog, Popover, Sheet, DropdownMenu, DataTable, Calendar, Carousel, Sidebar, and the rest. The components gallery is the master list; each Compose file is a native Compose implementation of the same component contract as its packages/ui/src/components/*.tsx counterpart, with a doc comment stating exactly what wasn't carried over.

Reuse over re-derivation is the rule: KinetixSlider wraps Material3's Slider, KinetixCalendar its DatePicker, KinetixToaster its SnackbarHost, KinetixCarousel HorizontalPager, KinetixSidebar ModalNavigationDrawer — each re-themed onto the token contract rather than hand-built. KinetixSelect / KinetixDrawer are thin aliases over KinetixDropdownMenu / KinetixSheet — the same primitive under a different name.

Known gaps#

  • Chart is ported but scoped. KinetixChart draws bar and line series with Canvas (no charting dependency) and requires a description for TalkBack; anything richer is a charting-library decision. Form isn't ported. The React Form is react-hook-form glue; KinetixField + KinetixFieldLabel / Description / Message are the Compose equivalent — Compose has no RHF-shaped context to wrap.
  • NavigationMenu isn't ported — a hover-triggered desktop mega-menu with no Android idiom.
  • NativeSelect, AvatarGroup, Tour, and KanbanBoard aren't ported either. NativeSelect wraps the browser's own <select>; KinetixSelect already wraps Compose's own DropdownMenu. AvatarGroup re-wraps its children, not an idiomatic Compose pattern — compose a Row of KinetixAvatars with spacedBy((-8).dp) instead. Tour targets an arbitrary already-rendered element by CSS selector, which Compose has no equivalent live-tree query for — compose a sequence of KinetixPopover steps instead. KanbanBoard is built on @dnd-kit's accessible multi-container drag-and-drop, with no equivalent dependency in this repo's native packages — use Compose's own drag gestures + LazyColumn for the specific board.
  • ResultState, ReferenceCode, PriceBreakdown and PassCard aren't ported yet. They are React-first betas from the business capability roadmap's Phase 1, and a native port is an open roadmap decision. Compose KinetixEmpty for a result, a SelectionContainer with a KinetixButton that copies for a reference code, KinetixDescriptionList rows for a price breakdown, and KinetixCard + KinetixDescriptionList + the supplied code as an Image for a pass.
  • AmountDisplay, GuestPicker, CountrySelect, PhoneInput, DateRangeInput, TimeSlotPicker and AddressFields aren't ported yet. They are React-first betas from the roadmap's Phase 2, with the same open decision. Compose a tabular-figure Text with a content description for an amount, KinetixNumberInputs in a KinetixPopover for guests, KinetixSelectTrigger + KinetixSelectItem for a country, a calling-code select and a KeyboardType.Phone KinetixInput in a left-to-right row for a phone number, Material 3's DateRangePicker for dates, KinetixToggle chips in a selectableGroup() for time slots, and KinetixFields for an address.
  • Scoped ports: KinetixSheet is bottom-only. KinetixSidebar drops rail/icon-collapse mode, SidebarInset, the cookie and the shortcut. KinetixAppBar drops the mobile menu-toggle collapse — the nav stays visible and scrolls horizontally instead. KinetixDropdownMenu / ContextMenu / Menubar have no nested submenus. KinetixResizablePanels is two panels. KinetixCommandDialog doesn't fuzzy-filter (the caller filters). KinetixCodeBlock has no syntax highlighting. KinetixCalendar / DatePicker have no range select. KinetixImage / FileUpload / AudioPlayer are presentational — no Coil, file picker, or media playback; you wire those in.
  • Not published yet, no screenshot-test harness. The publication workflow has never run for real. CI compiles the whole package (assembleDebug + lintDebug) on every push that touches it or the token source.

The SwiftUI and Flutter ports carry the same React surface, and all three native platforms skip the same 19 standing non-ports (AddressFields, AmountDisplay, AvatarGroup, Combobox, CountrySelect, DateRangeInput, DirectionProvider, Form, GuestPicker, KanbanBoard, NativeSelect, NavigationMenu, PassCard, PhoneInput, PriceBreakdown, ReferenceCode, ResultState, TimeSlotPicker, and Tour). Components missing from only some platforms are listed, with the reason, under Not on every platform. Being on a platform doesn't mean carrying every React feature: a port that drops something says so in its own doc comment — see Contributing for the rule that governs this.