# react-native-smart-image

> Wrap Image components in to have them fade in and adjust aspect ratio when they finish loading

Latest version **0.1.3** (published 2017-04-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-smart-image
pnpm add react-native-smart-image
yarn add react-native-smart-image
bun add react-native-smart-image
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2017-04-29 |
| First published | 2017-04-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | originally by Brent Vatne |
| Maintainers | idibidiart |

## Links

- npm: https://www.npmjs.com/package/react-native-smart-image
- npm.io page: https://npm.io/package/react-native-smart-image

## Dependencies (3)

- [react-mixin](https://npm.io/package/react-mixin.md) ^3.0.5
- [react-timer-mixin](https://npm.io/package/react-timer-mixin.md) ^0.13.3
- [react-clone-referenced-element](https://npm.io/package/react-clone-referenced-element.md) ^1.0.1

## Recent versions

- 0.1.3 (latest) — 2017-04-29
- 0.1.2 — 2017-04-29
- 0.1.1 — 2017-04-29
- 0.1.0 — 2017-04-29

## README

## @expo/react-native-fade-in-image

Wrap Image components in `<FadeIn>` to have them fade in pleasantly when they finish loading.

### Installation

```
npm i @expo/react-native-fade-in-image --save
```

### Usage

```javascript
import React from 'react';
import { Image } from 'react-native';
import FadeIn from '@expo/react-native-fade-in-image';

const uri = 'https://d3lwq5rlu14cro.cloudfront.net/v1/AQ5jDS5SYyUkapWWEviV.png';

class FancyImage extends React.Component {
  render() {
    return (
      <FadeIn>
        <Image source={{ uri }} style={{ width: 162, height: 28 }} />
      </FadeIn>
    );
  }
}
```

#### props

- `style` adds style to the image wrapper.
- `renderPlaceholderContent` renders an element while loading the image, e.g. a spinner.
- `placeholderStyle` adds style to the placeholder wrapper, default background color is `#eee`.

### Example

See the [example
project
source](https://github.com/expo/react-native-fade-in-image/tree/master/example)
or try it out at https://exp.host/@community/fade-in-image-example

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