# native-positioning

> Set positioning for React Native component in one line of code

Latest version **1.0.1** (published 2021-05-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install native-positioning
pnpm add native-positioning
yarn add native-positioning
bun add native-positioning
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-05-29 |
| First published | 2021-04-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jakub Biesiada |
| Maintainers | jbiesiada |
| Keywords | react, utility, react-native, functions, style, vertical, horizontal, top, positioning, bottom, right, left |

## Links

- npm: https://www.npmjs.com/package/native-positioning
- Repository: https://github.com/native-ly/native-positioning
- Homepage: https://github.com/native-ly/native-positioning#readme
- Issues: https://github.com/native-ly/native-positioning/issues
- npm.io page: https://npm.io/package/native-positioning

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2021-05-29
- 1.0.0 — 2021-04-24
- 0.0.0 — 2021-04-06

## README

# [Native Positioning](https://github.com/native-ly/native-positioning)

[![NPM version](https://img.shields.io/npm/v/native-positioning?style=flat-square)](https://www.npmjs.com/package/native-positioning)
[![NPM downloads](https://img.shields.io/npm/dm/native-positioning?style=flat-square)](https://www.npmjs.com/package/native-positioning)
[![NPM license](https://img.shields.io/npm/l/native-positioning?style=flat-square)](https://www.npmjs.com/package/native-positioning)
[![run in expo snack](https://img.shields.io/badge/Run%20in%20Snack-4630EB?style=flat-square&logo=EXPO&labelColor=FFF&logoColor=000)](https://snack.expo.io/@jbiesiada/native-positioning)
[![Codecov](https://img.shields.io/codecov/c/github/native-ly/native-positioning?style=flat-square)](https://codecov.io/gh/native-ly/native-positioning)
[![Travis](https://img.shields.io/travis/com/native-ly/native-positioning/main?style=flat-square)](https://travis-ci.com/native-ly/native-positioning)

## About

Set positioning for React Native component in one line of code

## How to Install

First, install the library in your project by npm:

```sh
$ npm install native-positioning
```

Or Yarn:

```sh
$ yarn add native-positioning
```

## Getting Started

**• Connect libary with project using ES6 import:**

```js
import { positioning } from 'native-positioning'
```

## Options

You can use functions with next combinations:

- `(all)`
- `(vertical, horizontal)`
- `(top, horizontal, bottom)`
- `(top, right, bottom, left)`

All params are `number` or `string` type

## Example

```jsx
import React from 'react'
import { View } from 'react-native'
import { positioning } from 'native-positioning'

const App = () => {
  return (
    <View
      style={{
        backgroundColor: 'red',
        ...positioning(0, 20, 15),
        // top: 0,
        // right: 20,
        // bottom: 15,
        // left: 20,
      }}
    />
  )
}
```

## License

This project is licensed under the MIT License © 2021-present Jakub Biesiada

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