Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/anishmprasad/react-imgr

A Progressive image component for react applications
https://github.com/anishmprasad/react-imgr

lazyload preload-images progressive-image progressive-image-loading react react-component reactjs

Last synced: 3 months ago
JSON representation

A Progressive image component for react applications

Awesome Lists containing this project

README

        

# react-imgr

A Progressive Image component for React.

### Installation

```

// with npm with react-extensions
$ npm install react-extensions

// with npm with react-compounds
$ npm install @react-compounds/image --save

// with yarn with react-compounds
$ yarn add @react-compounds/image

// with npm
$ npm install react-imgr --save

// with yarn
$ yarn add react-imgr
```

### Usage

This is the basic usage of react-dropdown

```Javascript
import Image from 'react-imgr';
import 'react-imgr/dist/styles.min.css'

```

### Props

| Name | Type | Required | Description |
| -------------- | --------- | -------- | -------------------------------- |
| src | `string` | `true` | the src of image |
| preloadSrc | `string` | `false` | the src image preload src |
| containerStyle | `object` | `false` | container css styles |
| initialBlur | `boolean` | `true` | the src initial state |
| alt | `string` | `true` | the src alt tag |
| scale | `boolean` | `false` | scale the src image |
| placeholder | `string` | `true` | the src of the placeholder image |

### Demo

[codesandbox.io](https://codesandbox.io/embed/xj5p7lzlnp)

[anishmprasad.com](https://anishmprasad.com/opensource/react-imgr)

[anishmprasad.github.io](https://anishmprasad.github.io/opensource/react-imgr)

### TODO

- [x] Optimization
- [x] CSS Polishing and Transitions
- [x] Documentation
- [x] Production Ready
- [ ] Code Cleanup

### License

Apache 2.0