Skip to content

The Skyscanner Design System, Backpack, for Android

License

Notifications You must be signed in to change notification settings

wiyarmir/backpack-android

 
 

Repository files navigation

Backpack Android

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

CI Status Greenkeeper badge Github tag license platform

Installation

Backpack is available through Jitpack. To install all of it, add the following line to your build.gradle (in your app module) in the dependencies block:

implementation 'com.github.skyscanner:backpack-android:1.3.1'

If your app resolves dependencies through Jitpack you're all set, if not add in your root build.gradle

repositories {
    maven { url 'https://jitpack.io' }
}

Components

Usage

Radii

The Backpack raddi tokens are available as dimension resource.

The supported tokens are

  • bpkBorderRadiusSm
  • bpkBorderRadiusPill

Elevation

The Backpack elevation tokens are available as dimension resource.

The supported tokens are

  • bpkElevationXs
  • bpkElevationSm
  • bpkElevationBase
  • bpkElevationLg
  • bpkElevationXl

Text Styles

The Backpack text styles are available as style resources.

The supported styles are

  • bpkTextXs
  • bpkTextXsEmphasized
  • bpkTextSm
  • bpkTextSmEmphasized
  • bpkTextBase
  • bpkTextBaseEmphasized
  • bpkTextLg
  • bpkTextLgEmphasized
  • bpkTextXl
  • bpkTextXlEmphasized
  • bpkTextXl
  • bpkTextXlEmphasized
  • bpkTextXxl
  • bpkTextXxlEmphasized

Color

<TextView
  android:text="This is Backpack Blue 500!"
  android:textColor="@color/bpkBlue500" />
R.color.bpkBlue500

Gradient

The Backpack gradient component is available with the BPKGradient utility class. It accepts the direction of the gradient as an optional parameter.

BpkGradients.getPrimary(context);
BpkGradients.getPrimary(context, GradientDrawable.Orientation.LEFT_RIGHT);

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.

About

The Skyscanner Design System, Backpack, for Android

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 84.3%
  • JavaScript 10.8%
  • HTML 4.9%