react-native-svg-view
TypeScript icon, indicating that this package has built-in type declarations

0.1.6 • Public • Published

react-native-svg-view

react-native-svg-view is a wrapper on popular native svg libraries Macaw and Glide. This library allows you to read svg file from a url.

Objecitve

You can find lots of libraries, which support svg in react native, but mostly of them are based on JSX or WebView approach. This library process svg data using a separate thread created on native side, so JS thread is not blocked due processing. Currently library supports data source from the internet.

Installation

npm install react-native-svg-view

or

yarn add react-native-svg-view

Usage

import SvgView from 'react-native-svg-view';
 
<SvgView
  source="https://www.dropbox.com/s/d1dbdvo4l7xry4w/downdogflip.svg?raw=1"
  style={{ height: 24, width: 24 }}
/>;

API

Prop Description Platform
style?: StyleProp component style both
source: string svg url both

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

Alternatives

react-native-svg

react-native-svg-uri

License

MIT

Package Sidebar

Install

npm i react-native-svg-view

Weekly Downloads

5

Version

0.1.6

License

MIT

Unpacked Size

511 kB

Total Files

171

Last publish

Collaborators

  • trozee