Giter Site home page Giter Site logo

alexloveblockchain / react-fade-in Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gkaemmer/react-fade-in

0.0 0.0 0.0 204 KB

Dead-simple component to fade in an element's children.

License: MIT License

JavaScript 60.67% HTML 5.54% TypeScript 33.79%

react-fade-in's Introduction

react-fade-in

Dead-simple and opinionated component to fade in an element's children.

React Fade In

Installation

npm install react-fade-in

Usage

react-fade-in

import FadeIn from 'react-fade-in';
// ...
<FadeIn>
  <div>Element 1</div>
  <div>Element 2</div>
  <div>Element 3</div>
  <div>Element 4</div>
  <div>Element 5</div>
  <div>Element 6</div>
</FadeIn>

API

FadeIn

Animates its children, one by one.

Note: To have children animate separately, they must be first-level children of the <FadeIn> component (i.e. members of its props.children).

Props

  • delay: Default: 50. Delay between each child's animation in milliseconds.
  • transitionDuration: Default: 400. Duration of each child's animation in milliseconds.
  • className: No default. Adds a className prop to the container div.
  • childClassName: No default. Adds a className prop to each child div, allowing you to style the direct children of the FadeIn component.
  • wrapperTag: Default: "div". Override the HTML element of the wrapping div.
  • childTag: Default: "div". Override the HTML element wrapped around each child element.
  • visible: New in 2.0.0: If not undefined, the visible prop can be used to control when the fade in occurs. If set to false after the fade-in animation completes, the children will fade out one by one.
  • onComplete: New in 2.0.0: specifies a callback to be called when the animation completes.

Happy fading.

react-fade-in's People

Contributors

gkaemmer avatar atnpcg avatar domarp-j avatar deveosys avatar themandunord avatar hackrmomo 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.