react-native-kpframework-svgkit
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

react-native-kpframework-svgkit

react-native-svg-uri基础上进行修改

Install library from npm

npm install react-native-kpframework-svgkit --save
npm install react-native-svg --save
// or
yarn add react-native-kpframework-svgkit
yarn add react-native-svg

目录

SvgImage

svg组件,使用方式类似于图片

import { SvgImage } from 'react-native-kpframework-svgkit';

<SvgImage width={200} height={200} source={require('./img/homer.svg')} />
<SvgImage
  width={200}
  height={200}
  source={{uri:'http://thenewcode.com/assets/images/thumbnails/homer-simpson.svg'}}
/>

Props

Prop Type Default Note
style ViewStyle 样式
width number 宽度
height number 高度
source ImageSource Same kind of source prop that <Image /> component has
svgXmlData String You can pass the SVG as String directly
fill Color Overrides all fill attributes of the svg file
fillAll Boolean Adds the fill color to the entire svg object

开源库的原生文档

文档

Package Sidebar

Install

npm i react-native-kpframework-svgkit

Weekly Downloads

1

Version

0.0.1

License

ISC

Unpacked Size

27.4 kB

Total Files

11

Last publish

Collaborators

  • xuwaer