An open API service indexing awesome lists of open source software.

https://github.com/developit/preact-svg

[DEPRECATED] :art: Use inline <svg> in Preact 4 and prior. :tulip:
https://github.com/developit/preact-svg

Last synced: 9 months ago
JSON representation

[DEPRECATED] :art: Use inline <svg> in Preact 4 and prior. :tulip:

Awesome Lists containing this project

README

          

> **Notice:** `preact-svg` is deprecated and obsolete.
>
> As of Preact 5.x, SVG is now supported right out of the box, so there is no need for `preact-svg`.

# preact-svg

[![NPM](http://img.shields.io/npm/v/preact-svg.svg)](https://www.npmjs.com/package/preact-svg)
[![travis-ci](https://travis-ci.org/developit/preact-svg.svg?branch=master)](https://travis-ci.org/developit/preact-svg)

This library provides an `` wrapper component that makes inline `` work in [Preact] version 4 and prior.

> **[CodePen Demo](http://codepen.io/developit/pen/ZbPdem?editors=001)**
>
> ![preact-svg](https://i.gyazo.com/df0bcc29e36ee107352600679e537176.gif)

---

### Usage Example

```js
import SVG from 'preact-svg';
import { h, render } from 'preact';
/** @jsx h */

const Main = () => (



);

render(, document.body);
```

---

### License

[MIT]

[Preact]: https://github.com/developit/preact
[MIT]: http://choosealicense.com/licenses/mit/