# @layflags/react-crossfade-image

> Simple React component for crossfading images

Latest version **1.1.3** (published 2018-08-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @layflags/react-crossfade-image
pnpm add @layflags/react-crossfade-image
yarn add @layflags/react-crossfade-image
bun add @layflags/react-crossfade-image
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2018-08-29 |
| First published | 2018-08-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 131.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 33 |
| Author | Khang Lu |
| Maintainers | layflags |
| Keywords | react-component, react, crossfade, image |

## Links

- npm: https://www.npmjs.com/package/@layflags/react-crossfade-image
- Repository: https://github.com/khanglu/react-crossfade-image
- Homepage: https://github.com/khanglu/react-crossfade-image#readme
- Issues: https://github.com/khanglu/react-crossfade-image/issues
- npm.io page: https://npm.io/package/@layflags/react-crossfade-image

## Dependencies (3)

- [react](https://npm.io/package/react.md) ^16.2.0
- [react-dom](https://npm.io/package/react-dom.md) ^16.2.0
- [prop-types](https://npm.io/package/prop-types.md) ^15.5.10

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.3 (latest) — 2018-08-29
- 1.1.2 — 2018-08-29

## README

# react-crossfade-image

![](https://img.shields.io/npm/v/react-crossfade-image.svg)

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

![alt react-crossfade-image-example](https://media.giphy.com/media/xUPGcHDL5FJaQXz2EM/giphy.gif)

## Usage

```javascript
npm install react-crossfade-image
```
Clone and run `npm start` for demo.

Sample component:

```javascript
<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

---
_Source: https://npm.io/package/@layflags/react-crossfade-image · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
