# preact-prism

> Preact syntax highlighting component using prism

Latest version **0.1.2** (published 2018-01-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install preact-prism
pnpm add preact-prism
yarn add preact-prism
bun add preact-prism
```

## 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.1.2 |
| Published | 2018-01-21 |
| First published | 2017-12-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | shredderming |
| Keywords | preact, prism, preact-components, highlight |

## Links

- npm: https://www.npmjs.com/package/preact-prism
- Repository: https://github.com/ShredderMing/preact-prism
- Homepage: https://github.com/ShredderMing/preact-prism#readme
- Issues: https://github.com/ShredderMing/preact-prism/issues
- npm.io page: https://npm.io/package/preact-prism

## Dependencies (2)

- [prismjs](https://npm.io/package/prismjs.md) ^1.9.0
- [preact-html](https://npm.io/package/preact-html.md) ^2.0.2

## Alternatives

- [@oh-my-pi/pi-natives](https://npm.io/package/@oh-my-pi/pi-natives.md) — 51.8K weekly downloads
- [@capgo/capacitor-light-sensor](https://npm.io/package/@capgo/capacitor-light-sensor.md) — 3.0K weekly downloads
- [@heyhuynhgiabuu/pi-diff](https://npm.io/package/@heyhuynhgiabuu/pi-diff.md) — 492 weekly downloads
- [@lotsa/verdant-lang-asm](https://npm.io/package/@lotsa/verdant-lang-asm.md) — 38 weekly downloads
- [new-era-syntax](https://npm.io/package/new-era-syntax.md) — 20 weekly downloads

## Recent versions

- 0.1.2 (latest) — 2018-01-21
- 0.0.2 — 2017-12-30
- 0.0.1 — 2017-12-23

## README

# preact-prism [![npm version](https://img.shields.io/npm/v/preact-prism.svg?style=flat)](https://www.npmjs.com/package/preact-prism)
use [Prism](http://prismjs.com) syntax highlighter in preact projects.
## Install

``` sh
npm install preact-prism
```
or

``` sh
yarn add preact-prism
```
## Example

``` js
import { h, render } from 'preact';
import Code from 'preact-prism';
import 'prismjs/themes/prism-solarizedlight.css'; /* import prism themes */

const code = `
.container {
  position: relative;
  height: 100%;
}
.inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%)
}
`;

render(<Code code={code} language="css" />, document.body);
// or render(<Code language="css">{code}</Code>, document.body);
```

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