Socket
Book a DemoInstallSign in
Socket

react-native-fade-image

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-fade-image

Pure component that extends native Image to have images fade in pleasantly when they finish loading

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

react-native-fade-image

Pure component that extends native Image to have images fade in pleasantly when they finish loading.

Component is pure, stateless and using native driver to animate as fast as possible.

Also prefetch feature for Image Cache is used.

Installation

npm i react-native-fade-image --save

Usage

Use as simple Image. All should work out of the box :)

import React from 'react';
import {View, StyleSheet} from 'react-native';
import FadeImage from 'react-native-fade-image';

const uri = 'https://facebook.github.io/react/img/logo_og.png';
const imageStyle = StyleSheet.create({width: 100, height: 100});

class FancyImage extends React.Component {
  render() {
    return (
        <View>
            <FadeImage  style = {imageStyle}
                        resizeMode = 'cover'
                        duration = {1000}
                        source = {{uri}}/>
        </View>
    )
  }
}

props

  • duration - fade in animation duration (ms).

Copyright © 2017-present, Stanislav Doskalenko doskalenko.s@gmail.com

FAQs

Package last updated on 22 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts