JSPM

@layflags/react-crossfade-image

1.1.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q25318F
  • License MIT

Simple React component for crossfading images

Package Exports

  • @layflags/react-crossfade-image

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@layflags/react-crossfade-image) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-crossfade-image

Simple component for crossfading images. Just pass it a new src prop and enjoy the fade!

alt react-crossfade-image-example

Usage

npm install react-crossfade-image

Clone and run npm start for demo.

Sample component:

<CrossfadeImage src={imageSrc} />

Props

src

Image source as string - required

duration

Duration of the fade, in ms - default to 300

timingFunction

Support all CSS timing functions - default to 'ease'

delay

Duration of the delay before fading, in ms - default to 0

style

Custom styling for the image - default to { maxWidth: '100%', maxHeight: '100%' } for responsive image scaling

License

MIT