# style-inject

> Inject style tag to document head.

Latest version **0.3.0** (published 2018-01-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install style-inject
pnpm add style-inject
yarn add style-inject
bun add style-inject
```

## Health

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

Positive: has types package; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2018-01-31 |
| First published | 2015-12-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/style-inject) |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 50 |
| Author | EGOIST |
| Maintainers | kchan, rem |
| Keywords | style, css, inject |

## Links

- npm: https://www.npmjs.com/package/style-inject
- Repository: https://github.com/egoist/style-inject
- Homepage: https://github.com/egoist/style-inject#readme
- Issues: https://github.com/egoist/style-inject/issues
- npm.io page: https://npm.io/package/style-inject

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 0.3.0 (latest) — 2018-01-31
- 0.2.1 — 2018-01-15
- 0.2.0 — 2017-10-16
- 0.1.2 — 2017-07-12
- 0.1.1 — 2016-09-07
- 0.1.0 — 2016-09-02
- 0.0.11 — 2015-12-07
- 0.0.1 — 2015-12-07

## README

# style-inject

[![NPM version](https://img.shields.io/npm/v/style-inject.svg?style=flat)](https://npmjs.com/package/style-inject) [![NPM downloads](https://img.shields.io/npm/dm/style-inject.svg?style=flat)](https://npmjs.com/package/style-inject) [![CircleCI](https://circleci.com/gh/egoist/style-inject/tree/master.svg?style=shield)](https://circleci.com/gh/egoist/style-inject/tree/master)  [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000&style=flat)](https://github.com/egoist/donate) [![chat](https://img.shields.io/badge/chat-on%20discord-7289DA.svg?style=flat)](https://chat.egoist.moe)

Inject style tag to document head.

## Installation

```bash
npm install style-inject
```

## Example

```javascript
import styleInject from 'style-inject';
const css = `
  body {
    margin: 0;
  }
`;
styleInject(css, options);
```

## Options

### insertAt

Type: `string`<br>
Possible values: `top`<br>
Default: `undefined`

Insert `style` tag to specific position of `head` element.

## License

MIT &copy; [EGOIST](https://github.com/egoist)

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