# react-native-aspect-ratio-image

> A responsive image component that always takes up the full width of the parent container and sets height according to the aspect ratio

Latest version **2.0.0** (published 2023-03-24) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2023-03-24 |
| First published | 2023-03-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 16.0.0 |
| Dependencies | 0 |
| Unpacked size | 18.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | vincentelias |
| Maintainers | vincentelias |
| Keywords | react-native, react-native fullwidth image, react-native full-width image, react-native image, full width, aspect ratio image, 100% image, ios, android |

## Links

- npm: https://www.npmjs.com/package/react-native-aspect-ratio-image
- Repository: https://github.com/Vincentelias/react-native-aspect-ratio-image
- Homepage: https://github.com/Vincentelias/react-native-aspect-ratio-image#readme
- Issues: https://github.com/Vincentelias/react-native-aspect-ratio-image/issues
- npm.io page: https://npm.io/package/react-native-aspect-ratio-image

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2023-03-24
- 1.7.0 — 2023-03-24
- 1.6.0 — 2023-03-24
- 1.5.0 — 2023-03-23
- 1.4.0 — 2023-03-22
- 1.3.0 — 2023-03-22
- 1.2.0 — 2023-03-22
- 1.1.0 — 2023-03-21
- 1.0.0 — 2023-03-21
- 0.1.0 — 2023-03-21

## README

# react-native-aspect-ratio-image

A responsive image component that always takes up the full width of the parent container and sets height according to the aspect ratio

## Installation

```sh
npm install react-native-aspect-ratio-image
```

## Usage

```js
import { AspectRatioImage } from 'react-native-aspect-ratio-image';

// Remote image
<AspectRatioImage source={{ uri: 'https://unsplash.it/400/400?image=1' }}/>

// Local image
<AspectRatioImage source={require('../assets/icon.png')} />

// You can use any props as you would on regular images:
<AspectRatioImage alt={"test-image"} source={require('../assets/icon.png')} />

```

## Author

Made by [Vincent Elias](https://github.com/Vincentelias)

## License

MIT

---

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