Skip to content
This repository has been archived by the owner on Oct 15, 2019. It is now read-only.

chitezh/react-native-svg-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-svg-image

Load SVG images from network(It does not work with local svg files at the moment)

Simple SVG image renderer with progress loader

Ever had challenges loading SVGs from network using react-native-svg or react-native-svg-uri? This simple package is worth a try.

Installation

npm install react-native-svg-image --save

Props

Prop Type Note
source ImageSource An object containing the svg image uri
style WebView style This extends WebView styles
<any WebView props Any other WebView prop(s)
import SVGImage from 'react-native-svg-image';

const SVGImageComponent = () => (
  <View style={{ flex: 1 }}>
    <SVGImage
      style={{ width: 80, height: 80 }}
      source={{uri:'https://fluent-panda.appspot.com.storage.googleapis.com/dumbbell.svg'}}
    />
  </View>
);

Shots

Dev

Lint & test (todo)


npm test