Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@skyscanner/bpk-foundations-react-native

Package Overview
Dependencies
Maintainers
0
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@skyscanner/bpk-foundations-react-native

Common Backpack design tokens for colors, spacing, font, etc.

  • 4.13.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

@skyscanner/bpk-foundations-react-native

React Native design tokens for colours, spacing, font, etc.

Installation

npm install @skyscanner/bpk-foundations-react-native --save-dev

Usage

JavaScript (ES6 module):

For React Native:

// Individual tokens
import { spacingBase } from '@skyscanner/bpk-foundations-react-native/tokens/base.react.native';

console.log(spacingBase);

// Whole token categories
import { colors } from '@skyscanner/bpk-foundations-react-native/tokens/base.react.native';

console.log(colors.colorSkyGrayTint01);

// All tokens
import * as tokens from '@skyscanner/bpk-foundations-react-native/tokens/base.react.native';

console.log(tokens);

For web:

// Individual tokens
import { spacingBase } from '@skyscanner/bpk-foundations-react-native/tokens/base.es6';

console.log(spacingBase);

// Whole token categories
import { colors } from '@skyscanner/bpk-foundations-react-native/tokens/base.es6';

console.log(colors.colorSkyGrayTint01);

// All tokens
import * as tokens from '@skyscanner/bpk-foundations-react-native/tokens/base.es6';

console.log(tokens);

JavaScript (CommonJS):

// Individual tokens
import { spacingBase } from '@skyscanner/bpk-foundations-react-native/tokens/base.common';

console.log(spacingBase);

// All tokens
import * as tokens from '@skyscanner/bpk-foundations-react-native/tokens/base.common';

console.log(tokens);

Transparency

It is possible to add opacity to Backpack color tokens as follows:

import { colorSkyBlue } from '@skyscanner/bpk-foundations-react-native/tokens/base.react.native';
import { setOpacity } from '@skyscanner/bpk-foundations-react-native';

const transparentBlue500 = setOpacity(colorSkyBlue, 0.7);

console.log(transparentBlue500);

FAQs

Package last updated on 08 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc