# react-lazy-image-loader

> Simple lazy loader for React.js + TypeScript ready

Latest version **0.1.2** (published 2020-08-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-lazy-image-loader
pnpm add react-lazy-image-loader
yarn add react-lazy-image-loader
bun add react-lazy-image-loader
```

## Health

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

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

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2020-08-02 |
| First published | 2020-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 1 |
| Unpacked size | 21.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ilyapasyuk |
| Maintainers | ilyapasyuk |

## Links

- npm: https://www.npmjs.com/package/react-lazy-image-loader
- npm.io page: https://npm.io/package/react-lazy-image-loader

## Dependencies (1)

- [styled-components](https://npm.io/package/styled-components.md) ^5.1.1

## Recent versions

- 0.1.2 (latest) — 2020-08-02
- 0.1.1 — 2020-08-02
- 0.1.0 — 2020-08-02

## README

# react-lazy-image-loader
 
Simple lazy loader for React.js
+ TypeScript ready

![size](https://img.shields.io/bundlephobia/min/react-lazy-image-loader.svg)
![](https://img.shields.io/npm/v/react-lazy-image-loader.svg?style=flat-square)

[NPM](https://www.npmjs.com/package/react-lazy-image-loader) |
[Github](https://github.com/ilyapasyuk/react-lazy-image-loader) |
[Feature request](https://github.com/ilyapasyuk/react-lazy-image-loader/issues/new)

### Installation

* `npm install --react-lazy-image-loader`
* `yarn add react-lazy-image-loader`

### How To Use

First import this component where you want to use it

`import LazyImage from react-lazy-image-loader"`

Then just renders it

`<LazyImage src="./link/to/source.jpg" alt="avatar" height={30} width={30} borderRadius={4} />`

### Props

|      _Prop_     |       _type_              | _Default value_ |
| --------------- |   :-------------------:   | :-------------: |
| src             |   string                  |      none       |
| alt             |   string                  |      none       |
| height          |   number?                 |      none       |
| width           |   number?                 |      none       |
| borderRadius    |   number?                 |      2          |

### Example

``` jsx
import React from "react";
import LazyImage from 'react-lazy-image-loader';


const App = () => {
    return (
        <LazyImage src="./link/to/source.jpg" alt="avatar" height={30} width={30} borderRadius={4} />
    );
}

export { App };
```

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