0.6.0 • Published 6 years ago

react-native-fade-view v0.6.0

Weekly downloads
167
License
BSD-3-Clause
Repository
github
Last release
6 years ago

react-native-fade-view

npm license codeclimate

Cross fade effect for child components

example

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

namedescriptiontypedefault
animationDurationFade animation durationNumber225
activeFade view stateBooleanfalse
removeHiddenSubviewsRemove invisible subviewsBooleantrue

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.