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

https://github.com/axtk/react-svgi

React SVGImage component
https://github.com/axtk/react-svgi

data-url react svg

Last synced: 3 months ago
JSON representation

React SVGImage component

Awesome Lists containing this project

README

        

# react-svgi

*React SVGImage component*

- converts an SVG image encoded as a [data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs) (`'data:image/svg+xml,...'`) into a React `` component;
- accepts all SVG attributes;
- accepts an optional `nonce` value for nested styles (via the `nonce` prop);
- can set its own nested `` to make the component more accessible (via the `alt` prop).

Code:

```tsx

```

Result:

```tsx

Abstract shapes
...

```