https://github.com/silverwind/react-svg-raw
React Component for wrapper-less inline SVGs
https://github.com/silverwind/react-svg-raw
inline-svg react react-component svg svg-inline
Last synced: about 1 month ago
JSON representation
React Component for wrapper-less inline SVGs
- Host: GitHub
- URL: https://github.com/silverwind/react-svg-raw
- Owner: silverwind
- License: bsd-2-clause
- Created: 2018-02-26T21:37:04.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-26T21:56:24.000Z (over 8 years ago)
- Last Synced: 2025-04-05T05:13:06.850Z (about 1 year ago)
- Topics: inline-svg, react, react-component, svg, svg-inline
- Language: JavaScript
- Size: 11.7 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-svg-raw
[](https://www.npmjs.org/package/react-svg-raw) [](https://www.npmjs.org/package/react-svg-raw) [](https://travis-ci.org/silverwind/react-svg-raw)
> React Component for wrapper-less inline SVGs
Unlike [other](https://github.com/MoOx/react-svg-inline) [modules](https://github.com/gilbarbara/react-inlinesvg), 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
```console
$ npm i react-svg-raw
```
## Usage
```jsx
import React from "react";
import SVG from "react-svg-raw";
export default () => (
"}/>
)
```
© [silverwind](https://github.com/silverwind), distributed under BSD licence