react-svg-raw

1.0.1 • Public • Published

react-svg-raw

React Component for wrapper-less inline SVGs

Unlike other modules, this module will not create a wrapper element around the SVG but instead render it as-is.

Every prop on the component except src will be copied to the resulting SVG. No effort on post-processing the SVG is taken by this module.

Install

$ npm i react-svg-raw

Usage

import React from "react";
import SVG from "react-svg-raw";
 
export default () => (
  <main>
    <SVG src={"<svg></svg>"}/>
  </main>
)
 

© silverwind, distributed under BSD licence

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    12
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    12
  • 1.0.0
    0

Package Sidebar

Install

npm i react-svg-raw

Weekly Downloads

12

Version

1.0.1

License

BSD-2-Clause

Unpacked Size

3.72 kB

Total Files

4

Last publish

Collaborators

  • silverwind