talira

Jetpack Compose

Android's recommended modern toolkit for building native UI

open sourceApache-2.0self-hostablefree

Jetpack Compose is Google's declarative UI toolkit for Android, written in and for Kotlin: you describe the UI with composable functions, and Compose updates it when the state they read changes, replacing XML layouts and views with less code. It has direct access to the Android platform APIs and built-in support for Material Design 3, dark theme, animations, adaptive layouts for every screen size, previews and testing in Android Studio, and it interoperates with existing views so you can adopt it gradually. It's part of Android Jetpack (AndroidX), released as libraries such as compose.ui, compose.foundation, compose.material3 and compose.runtime with a bill of materials to keep versions aligned, and is Apache-2.0 licensed. JetBrains' Compose Multiplatform extends it to iOS, desktop and web.

Problems it solves

  • build Android app UIs in Kotlin without XML layouts
  • a declarative UI framework for Android like SwiftUI or React
  • update my Android UI automatically when app state changes
  • build Material Design 3 screens with theming and dark mode
  • make one Android layout adapt to phones, tablets and foldables
  • migrate an existing Android View-based app to a modern UI toolkit gradually
  • animate UI changes in an Android app with little code
  • write UI tests for Android screens

Features

  • declarative UI with composable functions and state
  • Material Design 3 components and theming, including dark theme
  • animation APIs
  • adaptive layouts for phones, tablets, foldables and other form factors
  • interoperability with Android Views
  • previews and tooling in Android Studio
  • UI testing APIs
  • Compose bill of materials (BOM) for aligned library versions

Alternatives

The same job

These do what Jetpack Compose does.

  1. React Native Learn once, write anywhere
  2. SwiftUI Build great-looking apps across all Apple platforms with Swift
  3. Flutter Build apps for any screen

Compare Jetpack Compose with the top 3