# @nbottarini/react-native-relative-points

> Utility function that eases your responsive design

Latest version **0.2.0** (published 2023-12-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @nbottarini/react-native-relative-points
pnpm add @nbottarini/react-native-relative-points
yarn add @nbottarini/react-native-relative-points
bun add @nbottarini/react-native-relative-points
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2023-12-12 |
| First published | 2023-04-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 18.0.0 |
| Dependencies | 1 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Nicolás Bottarini |
| Maintainers | nbottarini |
| Keywords | styles, responsive, react-native, components |

## Links

- npm: https://www.npmjs.com/package/@nbottarini/react-native-relative-points
- Repository: https://github.com/nbottarini/react-native-relative-points
- Homepage: https://github.com/nbottarini/react-native-relative-points#readme
- Issues: https://github.com/nbottarini/react-native-relative-points/issues
- npm.io page: https://npm.io/package/@nbottarini/react-native-relative-points

## Dependencies (1)

- [react-native-responsive-screen](https://npm.io/package/react-native-responsive-screen.md) ^1.4.2

## Recent versions

- 0.2.0 (latest) — 2023-12-12
- 0.1.3 — 2023-08-09
- 0.1.2 — 2023-08-08
- 0.1.0 — 2023-04-21

## README

[![npm](https://img.shields.io/npm/v/@nbottarini/react-native-relative-points.svg)](https://www.npmjs.com/package/@nbottarini/react-native-relative-points)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![CI Status](https://github.com/nbottarini/react-native-relative-points/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/nbottarini/react-native-relative-points/actions)

# React Native relative points
Utility function that eases your responsive design

## Installation

Npm:
```
$ npm install --save @nbottarini/react-native-relative-points
```

Yarn:
```
$ yarn add @nbottarini/react-native-relative-points
```

## Usage

```typescript jsx
// Create a function named rv with your design width (for example the width used in Figma)
export const rv = (value) => relativeValueToPoints(value, 1440)

// Use your function to convert design units to proportional device units (the design proportions will be kept)
const MyComponent = () => (
    <View style={{ paddingTop: rv(14) }} />    
)

```

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