# positions

> A small, dependency free dom element positioning lib inspired by jquery-ui/position

Latest version **1.6.2** (published 2018-08-17) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install positions
pnpm add positions
yarn add positions
bun add positions
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.6.2 |
| Published | 2018-08-17 |
| First published | 2016-03-14 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 65.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 31 |
| Author | Alan Clarke |
| Maintainers | alz |
| Keywords | position, positioning, psotions, relative, jquery-ui/position |

## Links

- npm: https://www.npmjs.com/package/positions
- Repository: https://github.com/QubitProducts/positions
- Homepage: https://github.com/QubitProducts/positions#readme
- Issues: https://github.com/QubitProducts/positions/issues
- npm.io page: https://npm.io/package/positions

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 1.6.2 (latest) — 2018-08-17
- 1.6.1 — 2016-07-22
- 1.6.0 — 2016-04-18
- 1.5.1 — 2016-04-06
- 1.5.0 — 2016-04-06
- 1.4.0 — 2016-03-29
- 1.3.0 — 2016-03-29
- 1.2.0 — 2016-03-24
- 1.1.1 — 2016-03-15
- 1.1.0 — 2016-03-15
- 1.0.1 — 2016-03-14
- 1.0.0 — 2016-03-14

## README

## <img width="350" alt="positions" src="https://cloud.githubusercontent.com/assets/640611/13756080/1928a892-ea16-11e5-9c36-51dafb47fad4.png">

A small dom element positioning lib inspired by jquery-ui/position

## installation
```js
npm install positions
```

## features
- no dependencies
- simple functional api
- well tested in ie9+
- tiny (871 B)

## usage
```js
var positions = require('positions')
```

```js
// positions els 'top left' at targets 'top left'
var css = positions(el, 'top left', target, 'top left')
```

<img width="40" alt="top-left-top-left" src="https://cloud.githubusercontent.com/assets/640611/13719721/07895ab2-e7f2-11e5-8bee-6e8c74abcc7e.png">

```js
// positions els 'center center' at targets 'center center'
var css = positions(el, 'center center', target, 'center center')
```

<img width="40" alt="center-center-center-center" src="https://cloud.githubusercontent.com/assets/640611/13719719/0788243a-e7f2-11e5-943c-fcc580dbcd3f.png">

```js
// positions els bottom left at targets top left
var css = positions(el, 'bottom left', target, 'top left')
```

<img width="40" alt="bottom-left-top-left" src="https://cloud.githubusercontent.com/assets/640611/13742253/c7cee7d8-e9d2-11e5-8cab-aa8b22c7eecc.png">

```js
// positions els bottom center at targets bottom center
var css = positions(el, 'bottom center', target, 'bottom center')
```

<img width="40" alt="bottom-center-bottom-center" src="https://cloud.githubusercontent.com/assets/640611/13719722/0789dc9e-e7f2-11e5-9353-6cba4cd5c7ab.png">


...etc.


## run tests
```js
npm test
```

## browser compatibility
works in all good browsers! (also in ie9+)


## Want to work on this for your day job?

This project was created by the Engineering team at Qubit. As we use open source libraries, we make our projects public where possible.

We’re currently looking to grow our team, so if you’re a JavaScript engineer and keen on ES2016 React+Redux applications and Node micro services, why not get in touch? Work with like minded engineers in an environment that has fantastic perks, including an annual ski trip, yoga, a competitive foosball league, and copious amounts of yogurt.

Find more details on our Engineering site. Don’t have an up to date CV? Just link us your Github profile! Better yet, send us a pull request that improves this project.`
Contact GitHub API Training Shop Blog About

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