Coder Social home page Coder Social logo

lzok / react-native-progressive-image Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dylanvann/react-native-progressive-image

0.0 1.0 0.0 96 KB

๐ŸŒ ProgressiveImage, progressively load images with React Native.

License: MIT License

Python 15.51% Java 11.65% JavaScript 31.23% Objective-C 41.60%

react-native-progressive-image's Introduction

ProgressiveImage

๐ŸŒ ProgressiveImage, progressively load images with React Native.

npm license


Demo of ProgressiveImage.

Progressively load images. Loads a small thumbnail first. Includes fade and blur effects.

Installation

yarn add react-native-progressive-image

Usage

import ProgressiveImage from 'react-native-progressive-image'

const TheProgressiveImage = () =>
  <ProgressiveImage
    thumbnailSource={{ uri: 'http://i.imgur.com/O249H4P.png?bust' + Math.random() }}
    imageSource={{ uri: 'http://i.imgur.com/741u15U.png?bust' + Math.random() }}
    style={{ flex: 1, alignItems: 'stretch' }}
  />

Properties

Prop Description Default
imageSource Image source (e.g. { uri: 'https://facebook.github.io/react/img/logo_og.png' }). None
thumbnailSource Should be a low resolution version of the image used in imageSource. None
thumbnailBlurRadius Blur radius for the low resolution thumbnail (iOS only). 5
style Make sure to include width and height, or use flex. None
imageFadeDuration Fade-in duration for the image in ms. 250
thumbnailFadeDuration Fade-in duration for the thumbnail in ms. 250
onLoadThumbnail Callback function that gets called when the thumbnail is loaded. noop
onLoadImage Callback function that gets called when the main image is loaded. noop

Credits

Based on Sharath Prabhal's blog post.

react-native-progressive-image's People

Contributors

dylanvann avatar josepot avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.