Name: image
Owner: Legitcode
Description: an img tag, with lazy loading
Created: 2015-09-06 21:28:50.0
Updated: 2018-05-16 17:43:33.0
Pushed: 2016-04-15 14:18:02.0
Homepage: http://legitcode.github.io/image/
Size: 432
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
npm install legit-image
This is a react component based off this post. It works just like a regular image tag, except it will only fade in once the image has loaded.
rt Image from 'legit-image'
er(){
turn (
<Image src="http://facebook.github.io/react/img/logo.svg" />
speed
: fade in speed in seconds, ex: 0.5
, 1
, defaults to 1
You can pass any other props and they will be applied to the image tag. If you have any ideas on making this better, feel free to send a pull request.