1.3.8 • Published 1 year ago

expo-svg-uri-vtbl v1.3.8

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

expo-svg-uri

Render SVG images in Expo app from an URL or a static file

Install

npm install --save expo-svg-uri

OR

yarn add expo-svg-uri

Props

PropTypeDefaultNote
sourceImageSourceSame kind of source prop that <Image /> component has
svgXmlDataStringYou can pass the SVG as String directly
fillColorOverrides all fill attributes of the svg file
strokeColorOverrides all stroke attributes of the svg file
fillAllBooleanAdds the fill color to the entire svg object

Usage

Here's a simple example:

import SvgUri from "expo-svg-uri";

const TestSvgUri = () => (
  <View style={styles.container}>
    <SvgUri
      width="200"
      height="200"
      source={{
        uri: "http://thenewcode.com/assets/images/thumbnails/homer-simpson.svg"
      }}
    />
  </View>
);

or a static file

<SvgUri width="200" height="200" source={require("./img/homer-simpson.svg")} />
1.3.8

1 year ago

1.3.7

1 year ago

1.3.6

1 year ago

1.3.5

1 year ago

1.3.4

1 year ago

1.3.3

1 year ago

1.3.2

1 year ago