# react-native-figma-scale

> a react-native library to automatically scaling based on your design in Figma

Latest version **0.1.0** (published 2021-02-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-figma-scale
pnpm add react-native-figma-scale
yarn add react-native-figma-scale
bun add react-native-figma-scale
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2021-02-20 |
| First published | 2021-02-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 16.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | gie |
| Maintainers | gie3d |
| Keywords | react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/react-native-figma-scale
- Repository: https://github.com/gie3d/react-native-figma-scale
- Homepage: https://github.com/gie3d/react-native-figma-scale#readme
- Issues: https://github.com/gie3d/react-native-figma-scale/issues
- npm.io page: https://npm.io/package/react-native-figma-scale

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2021-02-20

## README

# react-native-figma-scale

a react-native library to automatically scaling based on your design in Figma

![Demo](./demo.jpg)

## Installation

```sh
npm install react-native-figma-scale
```

## Usage

```js
import * as React from 'react';

import { View } from 'react-native';
import { ScaleProvider, swidth, sheight } from 'react-native-figma-scale';

export default function App() {
  // define width, height in ScaleProvider (width and height from your Figma design)
  return (
    <ScaleProvider width={375} height={812}>
      <AppForTest />
    </ScaleProvider>
  );
}

const AppForTest = () => {
  // use swidth, sheight to translate your figma sizes into device sizes
  return (
    <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
      <View
        style={{
          width: swidth(350),
          height: sheight(400),
          backgroundColor: 'red',
          justifyContent: 'center',
          alignItems: 'center',
        }}
      ></View>
    </View>
  );
};
```

## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT

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