# Jetpack Compose

> Android's way to build app screens in Kotlin, from small blocks.

**Field:** Software Development  
**Category:** Mobile Development  
**Also known as:** Compose, Android Compose, Compose UI

## Think of it like

Think of it like building with blocks. Each small block is one part of the screen.

## Definition

Jetpack Compose is the modern way to build Android screens in the Kotlin language. You write small functions that each describe a part of the screen. Compose joins them and redraws a part when its data changes. It replaced the older way of laying out screens in XML files. It is the advised way to build new Android apps.

## Example

Jack builds a login screen in Compose from three blocks: two text boxes and one button.

## Example code

```kotlin
@Composable
fun Greeting() {
    Button(onClick = { println("Hi") }) {
        Text("Say hi")
    }
}
```

A Compose block with one button. Each block is a small Kotlin function.

## Why it matters

It is how most new Android screens are built. It takes less code than the old XML way.

## Common mistake

Mixing it up with Docker Compose. They share a word and nothing else.

## Three principles

- **Small blocks.** Each part of the screen is one function.
- **Updates itself.** A change in data redraws that part.
- **Kotlin first.** Screens are written in Kotlin, not XML.

## Related terms

- [Kotlin](https://learn.benibix.com/term/development/kotlin)
- [Native App](https://learn.benibix.com/term/development/native-app)
- [Android](https://learn.benibix.com/term/development/android)
- [Android Studio](https://learn.benibix.com/term/development/android-studio)
- [SwiftUI](https://learn.benibix.com/term/development/swiftui)
- [Declarative Programming](https://learn.benibix.com/term/development/declarative-programming)

![A table of four frameworks and who draws the button you see. SwiftUI, written in Swift for iPhone only, is drawn by iOS itself. Jetpack Compose, written in Kotlin for Android, is drawn by Compose on Android. React Native, written in JavaScript for both phones, uses each phone's own native button. Flutter, written in Dart for both phones, paints its own pixels. The two cross-platform rows are lit up.](https://learn.benibix.com/diagrams/dev2-mobile-frameworks.svg)

---

Source: https://learn.benibix.com/term/development/jetpack-compose
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
