react-native-fade-view

Cross fade effect for child components

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
react-native-fade-view
4700.6.06 years ago7 years agoMinified + gzip package size for react-native-fade-view in KB

Readme

react-native-fade-view
!npmnpm-badgenpm-url !licenselicense-badgelicense-url !codeclimatecodeclimate-badgecodeclimate-url
Cross fade effect for child components
!exampleexample-url

Installation

npm install --save react-native-fade-view

Usage

import React, { Component } from 'react';
import { Image, Text } from 'react-native';
import FadeView from 'react-native-fade-view';

class Example extends Component {
  render() {
    let { active } = this.state;

    return (
      <FadeView active={active}>
        <Text>loading...</Text>
        <Image onLoad={() => this.setState({ active: true })} />
      </FadeView>
    );
  }
}

Properties

name | description | type | default :-------------------- |:------------------------- | -------:|:------------ animationDuration | Fade animation duration | Number | 225 active | Fade view state | Boolean | false removeHiddenSubviews | Remove invisible subviews | Boolean | true

Example

git clone https://github.com/n4kz/react-native-fade-view
cd react-native-fade-view/example
npm install
react-native run-ios # or run-android

Copyright and License

BSD License
Copyright 2017-2018 Alexander Nazarov. All rights reserved.