# react-native-bpk-component-text

> Backpack React Native text component.

Latest version **5.0.1** (published 2020-02-26) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install react-native-bpk-component-text
pnpm add react-native-bpk-component-text
yarn add react-native-bpk-component-text
bun add react-native-bpk-component-text
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 5.0.1 |
| Published | 2020-02-26 |
| First published | 2017-08-17 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 77.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 543 |
| Author | Backpack Design System |
| Maintainers | georgegillams, k0nserv, ojcurt, shaundon, tiagohngl |

## Links

- npm: https://www.npmjs.com/package/react-native-bpk-component-text
- Repository: https://github.com/Skyscanner/backpack
- Homepage: https://github.com/Skyscanner/backpack#readme
- Issues: https://github.com/Skyscanner/backpack/issues
- npm.io page: https://npm.io/package/react-native-bpk-component-text

## Dependencies (3)

- [bpk-tokens](https://npm.io/package/bpk-tokens.md) ^32.0.0
- [prop-types](https://npm.io/package/prop-types.md) ^15.5.8
- [react-native-bpk-theming](https://npm.io/package/react-native-bpk-theming.md) ^2.0.1

## Recent versions

- 5.0.1 (latest) — 2020-02-26
- 4.2.5-alpha.1 (canary) — 2019-12-03
- 5.0.0 — 2020-02-19
- 4.2.12 — 2020-02-13
- 4.2.11 — 2020-01-30
- 4.2.10 — 2020-01-22
- 4.2.9 — 2020-01-20
- 4.2.8 — 2019-12-17
- 4.2.7 — 2019-12-12
- 4.2.6 — 2019-12-06
- 4.2.5 — 2019-12-04
- 4.2.4 — 2019-11-29
- 4.2.3 — 2019-11-28
- 4.2.2 — 2019-11-26
- 4.2.1 — 2019-11-14
- … 95 more at https://npm.io/package/react-native-bpk-component-text/versions

## README

# react-native-bpk-component-text

> Backpack React Native text component.

## Installation

```sh
npm install react-native-bpk-component-text --save-dev
```

## Usage

```js
import React, { Component } from 'react';
import { View, StyleSheet } from 'react-native';
import BpkText, { WEIGHT_STYLES } from 'react-native-bpk-component-text';
import { spacingBase } from 'bpk-tokens/tokens/base.react.native';

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    padding: spacingBase,
  }
});

export default class App extends Component {
  render() {
    return (
      <View style={styles.container}>
        <BpkText textStyle='xxl'>Backpack rocks!</BpkText>
        <BpkText textStyle='xl' weight={WEIGHT_STYLES.heavy}>Backpack rocks!</BpkText>
        <BpkText textStyle='lg' weight={WEIGHT_STYLES.emphasized}>Backpack rocks!</BpkText>
        <BpkText textStyle='base'>Backpack rocks!</BpkText>
        <BpkText textStyle='sm'>Backpack rocks!</BpkText>
        <BpkText textStyle='xs'>Backpack rocks!</BpkText>
        <BpkText textStyle='caps'>BACKPACK ROCKS!</BpkText>
      </View>
    );
  }
}
```

## Props

| Property                             | PropType                                             | Required | Default Value |
| ------------------------------------ | ---------------------------------------------------- | -------- | ------------- |
| children                             | node                                                 | true     | -             |
| textStyle                            | oneOf('xxl', 'xl', 'lg', 'base', 'sm', 'xs', 'caps') | false    | base          |
| weight                               | oneOf('regular', 'emphasized', 'heavy')              | false    | regular       |
| emphasize (deprecated, use `weight`) | bool                                                 | false    | false         |

## Theme props

* `textFontFamily`

NOTE: For Android we expect font names to follow a specific name convention for bold and heavy variations. E.g. if you provide a font called `myFont` to the `textFontFamily`theme attribute, we expect two more fonts to be available, those are `myFont_bold` and `myFont_black`.

---
_Source: https://npm.io/package/react-native-bpk-component-text · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
