# react-native-aspect-ratio

> Easy way to React Native aspect ratio calculator

Latest version **0.0.2** (published 2020-08-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-aspect-ratio
pnpm add react-native-aspect-ratio
yarn add react-native-aspect-ratio
bun add react-native-aspect-ratio
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2020-08-21 |
| First published | 2020-08-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Burak Sakalli |
| Maintainers | buraksakalli |
| Keywords | react-native, aspect ratio |

## Links

- npm: https://www.npmjs.com/package/react-native-aspect-ratio
- npm.io page: https://npm.io/package/react-native-aspect-ratio

## Recent versions

- 0.0.2 (latest) — 2020-08-21
- 0.0.1 — 2020-08-21

## README

# React Native Aspect Ratio Calculator

## Usage

### Import the module

```js
import { Screen } from "react-native-aspect-ratio";
```

### Config

#### Set an width/height
```jsx
  // You can use in your style.
  height: Screen.setDimension(90, "h", {411, 736}), // x, y values of designed component. x: 411, y: 736
  width: Screen.setDimension(80, 'w', {411, 736}),
```

#### Get full width/height

Returns screen width and height.

```jsx
  height: Screen.getDimension().height,
  width: Screen.getDimension().width,
```

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