# sticker

> Effortless sticky DOM elements.

Latest version **0.0.1** (published 2016-02-09) · MIT license · 0 weekly downloads

## Install

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

## 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.1 |
| Published | 2016-02-09 |
| First published | 2016-02-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Lim Yuan Qing |
| Maintainers | yuanqing |
| Keywords | css, dom, fixed, html, layout, position, sticky, stick |

## Links

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

## Dependencies (1)

- [shared-event-listeners](https://npm.io/package/shared-event-listeners.md) 0.1.2

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2016-02-09

## README

# sticker [![npm Version](http://img.shields.io/npm/v/sticker.svg?style=flat)](https://www.npmjs.com/package/sticker) [![Build Status](https://img.shields.io/travis/yuanqing/sticker.svg?branch=master&style=flat)](https://travis-ci.org/yuanqing/sticker)

> Effortless sticky DOM elements.

## Example

```
$ git clone https://github.com/yuanqing/sticker
$ npm install
$ npm install --global gulp
$ gulp example --open
```

## API

```js
import sticker from 'sticker';
```

### sticker(element [, options])

- `element` &mdash; A DOM element.

- `options` &mdash; An optional object literal:

  Key | Description | Default
  :--|:--|:--
  `containerElement` | The DOM element that contains `element` | `null`
  `stickyAboveViewportClassName` | Class name to add to `element` when it is &ldquo;sticky&rdquo; and *above* the viewport | `sticker--sticky-above-viewport`
  `stickyClassName` | Class name to add to `element` when it is &ldquo;sticky&rdquo; and *within* the viewport | `sticker--sticky`
  `topOffset` | The scroll offset at which the `element` becomes &ldquo;sticky&rdquo; | `0`

## Installation

Install via [npm](https://npmjs.com):

```
$ npm i --save sticker
```

## License

[MIT](LICENSE.md)

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