Giter Club home page Giter Club logo

backpack-android's Introduction

Backpack Android

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

CI Status Greenkeeper badge Release 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:9.10.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' }
}

Note that Backpack is expected to be used with AndroidX. Please refer to AndroidX migration guide to setup.

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 HockeyApp or by scanning the QR code below.

QR code

Components

Usage

Radii

The Backpack radii 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.

backpack-android's People

Contributors

tiagoengel avatar amolgupta avatar matteo-hertel avatar shaundon avatar bvitaliyg avatar matthewdavidson avatar greenkeeper[bot] avatar olliecurtis avatar k0nserv avatar anthonymonori avatar dominguezzz avatar szabadember avatar dependabot[bot] avatar greenkeeperio-bot avatar wiyarmir avatar reneargento avatar valermor avatar yoelglus avatar tibor92 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.