|
1 | | -# react-native-better-image |
| 1 | +<div align="center"> |
2 | 2 |
|
3 | | -A better image component for react-native with fallback images & progressive loading support |
| 3 | +# React Native Better Image |
4 | 4 |
|
5 | | -## Note |
| 5 | +A better image component for react-native with fallback images & progressive loading support |
6 | 6 |
|
7 | | -The library is ready for use but the documentation is WIP 👷🏽♂️ |
| 7 | +Built on top of `View`, `Image` & `Animated` components |
| 8 | + |
| 9 | +[![Build Status][build-badge]][build] |
| 10 | +[![Maintainability][maintainability-badge]][maintainability-url] |
| 11 | +[![Test Coverage][coverage-badge]][coverage-url] |
| 12 | + |
| 13 | +[![Version][version-badge]][package] |
| 14 | +[![Downloads][downloads-badge]][npmtrends] |
| 15 | +[![Bundlephobia][bundle-phobia-badge]][bundle-phobia] |
| 16 | + |
| 17 | +[![Star on GitHub][github-star-badge]][github-star] |
| 18 | +[![Watch on GitHub][github-watch-badge]][github-watch] |
| 19 | +[![Twitter Follow][twitter-badge]][twitter] |
| 20 | + |
| 21 | +[![Storybook][storybook-badge]][website] [![Chromatic][chromatic-badge]][chromatic] |
| 22 | + |
| 23 | +### Compatible with Expo & React Native Web 🚀 |
| 24 | + |
| 25 | +### PRs Welcome 👍✨ |
| 26 | + |
| 27 | +</div> |
| 28 | + |
| 29 | +- 📦 [Installation](#installation) |
| 30 | +- ℹ️ [Usage](#usage) |
| 31 | +- 📃 [Documentation][website] |
| 32 | +- ✨ [Motivation](#motivation) |
| 33 | +- 📱 [Example App][expo] |
8 | 34 |
|
9 | 35 | ## Installation |
10 | 36 |
|
@@ -38,10 +64,43 @@ import BetterImage from 'react-native-better-image'; |
38 | 64 | /> |
39 | 65 | ``` |
40 | 66 |
|
| 67 | +## Motivation |
| 68 | + |
| 69 | +React Native only includes a basic image component. I used to try solutions like [react-native-fast-image](https://github.com/DylanVann/react-native-fast-image) but none actually worked for the two of my most important issues: |
| 70 | + |
| 71 | +- Lack of a fallback placeholder |
| 72 | +- Progressive image loading (especially for banners & cover images) |
| 73 | + |
| 74 | +This library solves two of these important issues by providing a fallbackSource & a thumbnailSource prop. If you need more features, feel free to raise an issue or send a PR ✨ I'd be happy to help 👍 |
| 75 | + |
41 | 76 | ## Contributing |
42 | 77 |
|
43 | 78 | See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow. |
44 | 79 |
|
45 | 80 | ## License |
46 | 81 |
|
47 | 82 | MIT |
| 83 | + |
| 84 | +[build]: https://github.com/react-native-toolkit/react-native-better-image/actions |
| 85 | +[build-badge]: https://github.com/react-native-toolkit/react-native-better-image/workflows/build/badge.svg |
| 86 | +[coverage-badge]: https://api.codeclimate.com/v1/badges/acf5243d130542dde7c9/test_coverage |
| 87 | +[coverage-url]: https://codeclimate.com/github/react-native-toolkit/react-native-better-image/test_coverage |
| 88 | +[maintainability-badge]: https://api.codeclimate.com/v1/badges/acf5243d130542dde7c9/maintainability |
| 89 | +[maintainability-url]: https://codeclimate.com/github/react-native-toolkit/react-native-better-image/maintainability |
| 90 | +[bundle-phobia-badge]: https://badgen.net/bundlephobia/minzip/react-native-better-image |
| 91 | +[bundle-phobia]: https://bundlephobia.com/result?p=react-native-better-image |
| 92 | +[downloads-badge]: https://img.shields.io/npm/dm/react-native-better-image.svg |
| 93 | +[npmtrends]: http://www.npmtrends.com/react-native-better-image |
| 94 | +[package]: https://www.npmjs.com/package/react-native-better-image |
| 95 | +[version-badge]: https://img.shields.io/npm/v/react-native-better-image.svg |
| 96 | +[twitter]: https://twitter.com/dani_akash_ |
| 97 | +[twitter-badge]: https://img.shields.io/twitter/follow/dani_akash_?style=social |
| 98 | +[github-watch-badge]: https://img.shields.io/github/watchers/react-native-toolkit/react-native-better-image.svg?style=social |
| 99 | +[github-watch]: https://github.com/react-native-toolkit/react-native-better-image/watchers |
| 100 | +[github-star-badge]: https://img.shields.io/github/stars/react-native-toolkit/react-native-better-image.svg?style=social |
| 101 | +[github-star]: https://github.com/react-native-toolkit/react-native-better-image/stargazers |
| 102 | +[storybook-badge]: https://cdn.jsdelivr.net/gh/storybookjs/brand@master/badge/badge-storybook.svg |
| 103 | +[website]: https://betterimage.netlify.app |
| 104 | +[chromatic-badge]: https://img.shields.io/badge/-chromatic-%23fc521f |
| 105 | +[chromatic]: https://chromatic.com/library?appId=5f5078c6fe7d0c0022c82f06&branch=master |
| 106 | +[expo]: https://expo.io/@daniakash/react-native-better-image-example |
0 commit comments