Skip to content

Android Jetpack Compose components of open-source Orbit design system by Kiwi.com.

License

Notifications You must be signed in to change notification settings

kiwicom/orbit-compose

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Bořek Leikep
Dec 4, 2023
5b5e486 · Dec 4, 2023
Oct 19, 2023
Sep 11, 2023
Oct 19, 2023
Dec 4, 2023
Sep 29, 2023
Jun 30, 2022
Nov 15, 2023
Dec 4, 2023
Dec 4, 2023
Nov 15, 2023
Sep 29, 2023
Dec 20, 2022
Dec 4, 2023
Oct 19, 2023
Jul 1, 2023
Mar 6, 2021
Dec 2, 2021
Dec 4, 2023
Sep 29, 2023
Sep 20, 2023
Apr 29, 2023
Nov 16, 2023
Oct 9, 2023
Nov 28, 2022
Apr 13, 2021
Sep 20, 2023
Sep 11, 2023

Repository files navigation

orbit-components

Orbit Compose

Kiwi.com library CI Build GitHub release Maven release Compose 1.5 Material 3

About Orbit

Orbit is an open-source design system that aims to bring order and consistency to Kiwi.com products as well as the processes behind building them. It elevates the user experience and increases the speed and efficiency of how we design and build products.

This library allows developers to implement Orbit in a project using Jetpack Compose for Android.

Orbit Compose builds upon Material 3 library. If you need an integration with Material 2, see Theming chapter.

Setup

We publish our releases in Maven Central. To use this library, you can add the following dependencies to your Gradle file:

implementation("kiwi.orbit.compose:ui:<version>")
implementation("kiwi.orbit.compose:icons:<version>")
implementation("kiwi.orbit.compose:illustrations:<version>")

How to use?

In order to use one of Orbit's components, simply add them to your Composable function.

@Composable
fun MyScreen() {
    Column(
        verticalArrangement = Arrangement.spacedBy(8.dp),
        modifier = Modifier.padding(16.dp)
    ) {
        val maxWidth = Modifier.fillMaxWidth()
      
        ButtonPrimary(onClick = {}, maxWidth) {
            Text("This is an Orbit primary button")
        }
  
        Spacer(modifier = Modifier.padding(4.dp))
  
        AlertCritical(
            title = { Text("Alert title") },
            content = { Text("Content description") },
            actions = {
                ButtonPrimary(onClick = {}) { Text("Primary") }
                ButtonSecondary(onClick = {}) { Text("Secondary") }
            },
        )
    }
}

Colors, typography, and other foundational elements can be used by accessing the OrbitTheme object:

Text("Title 1", emphasis = ContentEmphasis.Minor)
Text("Big title in Title 1 style", style = OrbitTheme.typography.title1)
Text("Check your typography styles!", color = OrbitTheme.colors.warning.normal)

Orbit Button and Alert component

Orbit typography and colors

Icons and Illustrations

Icons and illustrations can be accessed in the same way, with the corresponding Icons and Illustrations objects:

Image(painter = Illustrations.AppKiwi, contentDescription = "app_kiwi")

Documentation

You can check out our component Catalog by downloading and installing our showcase application from Google Play.

The API documentation lists all possible types and composables in our library.

Contributing

Read our contributing guidelines to see how you can participate in this project.

Feedback

Any feedback you have for us is appreciated. If you have any suggestions about what we can do, do not hesitate to report the issue and we'll take a look at it.