Simple component for crossfading images. Just pass it a new src prop and enjoy the fade!
npm install react-crossfade-image
Clone and run npm start
for demo.
Sample component:
<CrossfadeImage src={imageSrc} />
Image source as string - required
Duration of the fade, in ms - default to 300
Support all CSS timing functions - default to 'ease'
Duration of the delay before fading, in ms - default to 0
Custom styling for the image - default to { maxWidth: '100%', maxHeight: '100%' } for responsive image scaling
Custom class string for the container element - default to 'CrossfadeImage'
MIT