Skip to content

LittleLiByte/react-native-c3image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

react-native-c3image

react-native-placeholder-image base on the official image component,which can load image smoothly on both iOS and Android,and when when the image load error,this component can show the error image you set.

Installation

npm install react-native-c3image  --save

usage

use just like a normal image component.

import C3Image from 'react-native-c3image'
<C3Image
                    style={{width:200,height:200}}
                    borderRadius={100}
                    source={{uri:'http://om2bpqram.bkt.clouddn.com/1496312196573.jpg'}}
                />

if you want to change the placeholderSource and placeholderErrorSource image source,use like this:

import C3Image from 'react-native-c3image'
<C3Image
                    style={{width:200,height:200}}
                    borderRadius={100}
                    source={{uri:'http://om2bpqram.bkt.clouddn.com/1496312196573.jpg'}}
                    placeholderSource={{uri:'http://om2bpqram.bkt.clouddn.com/1496312196573.jpg'}}
                    placeholderErrorSource={{uri:'http://om2bpqram.bkt.clouddn.com/1496312196573.jpg'}}
                />

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published