0.2.0 • Published 1 year ago

react-svgi v0.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

react-svgi

React SVGImage component

  • converts an SVG image encoded as a data URL ('data:image/svg+xml,...') into a React <svg> component;
  • accepts all SVG attributes;
  • accepts an optional nonce value for nested styles (via the nonce prop);
  • can set its own nested <title> to make the component more accessible (via the alt prop).

Code:

<SVGImage
    src={imageDataURL}
    alt="Abstract shapes"
    width={240}
    height={120}
/>

Result:

<svg xmlns="http://www.w3.org/2000/svg" width="240" height="120">
    <title>Abstract shapes</title>
    ...
</svg>
0.2.0

1 year ago

0.1.23

1 year ago

0.1.22

1 year ago

0.1.21

1 year ago

0.1.20

1 year ago

0.1.19

1 year ago

0.1.18

1 year ago

0.1.17

1 year ago

0.1.16

1 year ago

0.1.15

1 year ago

0.1.14

1 year ago

0.1.13

1 year ago

0.1.12

1 year ago

0.1.11

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago