Image with Super Powers
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.DS_Store
.gitignore
ImageLoader.js
README.md
Reducer.tsx Final first version Jan 10, 2019
Store.js
SuperImage.tsx
index.js Final first version Jan 10, 2019
package.json
yarn.lock Final first version Jan 10, 2019

README.md

React Native Super Image

React Native Super Image: Image component with Super Powers!

  • Animation loading
  • Downloading and caching image in the background
  • Showing default background color before loading
  • Option to resize to 100% height or width, keeping image ratio

Install

yarn add react-native-super-image

Usage

import RNSuperImage from "react-native-super-image";
import expo from "expo";
const SuperImage = props => RNSuperImage({ ...props, expo });

Props

  • expo (required): The expo class
  • animated (optional): boolean. if set to true, the image fades in for 100ms once it's loaded
  • source (required): see react native image
  • style (optional): see react native image
  • width (optional): number or "auto". overwrites style-width. If set to auto, it calculates the width based on height and image ratio
  • heigh (optional)t: number or "auto". overwrites style-height. If set to auto, it calculates the height based on width and image ratio

Contribute

Contact me or submit an issue if you have ideas or want to collaborate / contribute