Skip to content

Skyscanner/backpack-android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

be9c7d8 · Mar 18, 2024
Mar 8, 2024
Jul 26, 2023
Mar 15, 2024
Mar 18, 2024
Nov 30, 2023
Mar 18, 2024
Aug 7, 2023
Mar 15, 2024
Apr 2, 2019
Mar 18, 2024
Mar 12, 2024
Feb 6, 2023
Jun 12, 2023
Jan 11, 2024
May 3, 2023
Oct 3, 2023
Oct 3, 2023
Mar 16, 2023
Jun 26, 2023
Feb 11, 2021
May 18, 2023
Feb 5, 2018
Aug 28, 2018
Jan 9, 2023
Sep 12, 2019
Jan 11, 2024
Mar 17, 2023
Jan 17, 2022
Feb 8, 2023
Mar 17, 2023
Sep 14, 2023
Apr 15, 2021
Feb 14, 2023
Feb 14, 2023
May 5, 2021
Feb 13, 2024
Mar 24, 2023
Jun 15, 2023
Mar 7, 2024
Mar 7, 2024
May 3, 2023
Mar 7, 2024
Mar 18, 2024
Mar 18, 2024
Mar 17, 2023
Apr 15, 2021
May 3, 2023

Repository files navigation

Backpack Android

Backpack is a collection of design resources, reusable components and guidelines for creating Skyscanner's products.

CI Status

Maven Central license platform

Backpack for Android supports two targets: Android View system and Jetpack Compose.

Demo application

The Backpack demo application is a good way of referring to the variants available for a component and their correct usage. The code is available under /app directory. The app can be downloaded from App Center or by scanning the QR code below.

QR code

Installation

Backpack is available through Maven Central. Thus, before adding Backpack to your project, make sure Maven Central is in your repositories list. Add this to your root build.gradle:

repositories {
    mavenCentral()
}

Add the following dependencies to your build.gradle (in your app module) in the dependencies block:

implementation "net.skyscanner.backpack:backpack-android:bpkVersion" // for Android View system
implementation "net.skyscanner.backpack:backpack-compose:bpkVersion" // for Compose

All Backpack components must to be used within BpkTheme scope:

Android View system:

  <style name="AppTheme" parent="BpkTheme">
    <!-- Customize your theme here. -->
  </style>

Compose:

BpkTheme {
    BpkText("Hello from Compose!")
}

Features

Android View system

You can find the list of the available components, as well as the code samples and the screenshots here.

All design system tokens exist as public Android resources. Here's the list of the token types and the samples of its usage:

  • border radii@dimen/bpkBorderRadiusSm (XML), R.dimen.bpkBorderRadiusSm (Java/Kotlin)
  • colours@color/bpkSkyBlue (XML), R.color.bpkSkyBlue (Java/Kotlin)
  • semantic colours@color/bpkTextPrimary (XML), R.color.bpkTextPrimary (Java/Kotlin)
  • elevations@dimen/bpkElevationSm (XML), R.dimen.bpkElevationSm (Java/Kotlin)
  • spacings@dimen/bpkSpacingLg (XML), R.dimen.bpkSpacingLg (Java/Kotlin)
  • text styles?bpkTextBaseSize (XML)

Jetpack Compose

Backpack for Compose targets stable Compose releases.

You can find the list of the available components, as well as the code samples and the screenshots here.

The design system tokens are located in a net.skyscanner.backpack.compose.tokens package. Here's the list of the token types and the samples of its usage:

Contributing to Backpack

Please see the Contributing guide for instructions on contributing to this project.

License

Backpack is available under the Apache 2.0 license. See the LICENSE file for more info.