react-native-placeholder-img
v1.0.0
Published
react native image placeholder
Downloads
3
Maintainers
Readme
react-native-placeholder-img
- Support Android and iOS.
- The image component that supports shows placeholderSource when load image network.
- Show placeholderSource if the main source can't be loaded or error.
- Support custom ActivityIndicator loading.
Installation
npm install react-native-placeholder-img
Usage
import PlaceholderImg from 'react-native-placeholder-img'
// ...
<PlaceholderImg
style={{ width: 320, height: 250 }}
loadingStyle={{ size: 'large', color: 'blue' }}
source={{ uri: 'https://images.unsplash.com/photo-1491485880348-85d48a9e5312?ixlib=rb-1.2.1&ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&auto=format&fit=crop&w=1950&q=80' }}
/>
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT