Pantrix UI

One codebase. Four platforms. Each one at home.

Pantrix UI is a design system for Compose Multiplatform: 108 components on Compose Foundation, with no Material dependency, and one theme that follows the conventions of Android, iOS, the desktop and the web.

›

implementation("com.pantrixui:components:0.2.1")

platform = PlatformType.Ios

iOS: touch targets of 44pt, rounded buttons that press in to 97%, fields 44pt tall.

108

components

6

Kotlin targets, from Android to Wasm

4

platform presets in one theme

3

languages, right-to-left included

0

Material dependencies

ONE APP, EVERY WINDOW

Written once. At home on every screen.

A recipe app made with Pantrix, as its window grows from a phone to a foldable, a tablet, a desktop and a browser tab. Navigation moves from a bar to a rail and a sidebar, a recipe opens beside its list, and a foldable set on a table keeps its buttons below the fold.

Try your own window in the simulator →

IOS · COMPACT · 390 × 844

A tab bar below and one list; a recipe opens on a screen of its own.

Step 1 of 6

Photos: Victoria Shes, Markus Spiske, Rashpal Singh and The Design Lady on Unsplash; Engin Akyurt, Rukiye Demir and Hilal Bülbül on Pexels.

ONE THEME, FOUR SETS OF MANNERS

The same button is not the same everywhere.

A theme knows the platform it runs on. Touch targets, the shape of a button, the way it answers a press and the height of a field follow that platform, and PantrixTheme(platform = …) asks for another one in a preview or a test.

WRITE IT ONCE

Kotlin you would write anyway.

Every component takes a state, a label and a tagKey. The tag finds it in a test and in a Maestro flow; the label is read by the screen reader; the rest comes from the theme.

Text areas that grow, then scroll, with a count of what may still be typed

A tap outside puts the keyboard away on iOS

Tags like TextArea_comment, never from visible text

commonMain
@Composable
fun ReviewForm(onSend: (String) -> Unit) {
    val comment = rememberTextFieldState()
    PantrixTheme(preset = PantrixPreset) {
        Column(Modifier.clearFocusOnTap(), verticalArrangement = Arrangement.spacedBy(16.dp)) {
            PantrixTextArea(
                state = comment,
                label = stringResource(Res.string.comment),
                maxLength = 280,
                tagKey = "comment"
            )
            PantrixButton(
                text = stringResource(Res.string.send),
                onClick = { onSend(comment.text.toString()) },
                tagKey = "send"
            )
        }
    }
}

WHAT COMES WITH IT

The problems every Compose Multiplatform app meets, solved once.

FOR CODING ASSISTANTS

Your assistant writes Pantrix, not Material.

The documents are written from the library's own sources at every build. An assistant reads them through the MCP server, the skill or llms.txt, and every page here has a "Copy page" button for the rest.

MCP server

Skill

llms.txt

pantrix-ui.json

Terminal
$ claude mcp add -t http pantrix-ui https://pantrixui.com/mcp

> A comment box under each order, 280 characters at most
  search_components("comment, several lines")
  get_component("PantrixTextArea")
  PantrixTextArea(state = comment, label = …, maxLength = 280, tagKey = "comment")

YOUR BRAND

A brand's look in one DesignPreset.

Colours for light and dark, the type scale, the shapes and any component's overrides. This site wears one called Pantrix. Build your own in the theme builder and take it away as Kotlin.

primary

#2264FF

primary.​container

#ECF3FE

textPrimary

#05070A

success

#1A8556

warning

#B95D15

danger

#C42A55

Pantrix blue, 50 to 700

BUILT WITH PANTRIX UI

This site is the first reference.

pantrixui.com and its apps for Android, iOS and macOS share one Kotlin codebase and draw their own screens with the library's components. Its source is open.

Web

Wasm, and a JavaScript build for older browsers

Android

Phones, tablets and foldables

iOS

iPhone and iPad

macOS

A signed and notarized app

Start with one line in Gradle.

Android 11 and newer, iOS, the desktop's JVM and the browser's Wasm and JavaScript, from one source set.

P

Pantrix UI

A design system and adaptive UI library for Compose Multiplatform.

Docs

Components

Resources

Apache License 2.0

English

·