1.0.0 • Published 3 years ago

react-crossfade-img v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

react-crossfade-img

React component to crossfade images.

Install

Install with npm:

npm install react-crossfade-img

Install with yarn:

yarn add react-crossfade-img

Usage

import CrossfadeImg from 'react-crossfade-img';

function App() {
  return (
    <CrossfadeImg
      src={imageUrl}    // Image URL
      width='640px'     // CSS width property
      height='480px'    // CSS height property
      objectFit='fill'  // CSS object-fit property (optional, defaults to 'fill')
      duration='1s'     // CSS transition-duration property (optional, defaults to '1s')
    />
  );
}