# react-native-line-anchors

> ## Getting started

Latest version **0.0.4** (published 2019-02-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-line-anchors
pnpm add react-native-line-anchors
yarn add react-native-line-anchors
bun add react-native-line-anchors
```

## 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.4 |
| Published | 2019-02-22 |
| First published | 2018-10-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 71.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Gustavo Genovese |
| Maintainers | gcesarmza |
| Keywords | react-native, line |

## Links

- npm: https://www.npmjs.com/package/react-native-line-anchors
- npm.io page: https://npm.io/package/react-native-line-anchors

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 0.0.4 (latest) — 2019-02-22
- 0.0.3 — 2019-01-21
- 0.0.2 — 2018-11-16
- 0.0.1 — 2018-10-04

## README

# react-native-line-anchors

## Getting started

`$ npm install react-native-line-anchors --save`

### Mostly automatic installation

`$ react-native link react-native-line-anchors`

### Manual installation


#### iOS

1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `react-native-line-anchors` and add `react-native-line-anchors.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `librnlineanchors.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)

#### Android

1. Open up `android/app/src/main/java/[...]/MainApplication.java`
  - Add `import com.gustavogenovese.rnlineanchors.RNTLinePackage;` to the imports at the top of the file
  - Add `new RNTLinePackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
  	```
  	include ':react-native-line-anchors'
  	project(':react-native-line-anchors').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-line-anchors/android')
  	```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
  	```
      implementation project(':react-native-line-anchors')
  	```

## Usage
```javascript
import Line from 'react-native-line-anchors';

...
render() {
  return (
    <Line x0={100} y0={100} x1={200} y1={200} color={"red"} />
    <Line x0={200} y0={220} x1={100} y1={320} lineWidth={15} />
    <Line x0={100} y0={340} x1={200} y1={440} color={"blue"} lineWidth={20} drawAnchors drawMiddleAnchor />
    <Line x0={200} y0={460} x1={100} y1={560} color={"violet"} drawMiddleAnchor />
  );
}
```
## Sample
![](https://github.com/gcesarmza/react-native-line-anchors/blob/master/sample.png)

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