https://github.com/legitcode/image
an img tag, with lazy loading
https://github.com/legitcode/image
Last synced: 10 months ago
JSON representation
an img tag, with lazy loading
- Host: GitHub
- URL: https://github.com/legitcode/image
- Owner: Legitcode
- Created: 2015-09-06T21:28:50.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-15T14:18:02.000Z (almost 10 years ago)
- Last Synced: 2025-02-28T19:06:50.898Z (11 months ago)
- Language: JavaScript
- Homepage: http://legitcode.github.io/image/
- Size: 422 KB
- Stars: 47
- Watchers: 9
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://circleci.com/gh/Legitcode/image)
##Install
`npm install legit-image`
##What is this?
This is a react component based off [this post](http://davidwalsh.name/lazyload-image-fade). It works just like a regular image tag, except it will only fade in once the image has loaded.
###Example
~~~js
import Image from 'legit-image'
render(){
return (
)
}
~~~
##Props
- `speed`: fade in speed in seconds, ex: `0.5`, `1`, defaults to `1`
##That's about it
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.