Socket
Socket
Sign inDemoInstall

react-progressive-image-loading-2

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-progressive-image-loading-2

Progressively load images using a blur effect. Edit


Version published
Weekly downloads
1
Maintainers
1
Install size
19.1 kB
Created
Weekly downloads
 

Readme

Source

React Progressive Image Loading

Progressively load images using a blur effect.

CircleCI npm version

example

Installation

$ npm install react-progressive-image-loading --save

Import

import ProgressiveImage from "react-progressive-image-loading";

Usage

<ProgressiveImage
    preview="/images/tiny-preview.png"
    src="/images/preview.png"
    render={(src, style) => <img src={src} style={style} />}
/>

Instead of using the img tag, you can use background-image with a div.

<ProgressiveImage
    preview="/images/tiny-preview.png"
    src="/images/preview.png"
    render={(src, style) => <div style={Object.assign(style, { backgroundImage: `url(${src})` })} />}
/>

You can also customize the transition time and the timing function used for that transition.

<ProgressiveImage
    preview="/images/tiny-preview.png"
    src="/images/preview.png"
    transitionTime={500}
    transitionFunction="ease"
    render={(src, style) => <img src={src} style={style} />}
/>

Keywords

FAQs

Last updated on 23 Mar 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc