troZee / react-native-svg-view

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

react-native-svg-asset-plugin

License

MIT

About

License:MIT License


Languages

Language:Swift 95.0%Language:Kotlin 1.4%Language:Java 1.3%Language:Ruby 0.9%Language:Objective-C 0.7%Language:TypeScript 0.3%Language:JavaScript 0.3%Language:C 0.0%