Legitcode / image

an img tag, with lazy loading
http://legitcode.github.io/image/
47 stars 0 forks source link

Circle CI

Install

npm install legit-image

What is this?

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.

Example

import Image from 'legit-image'

render(){
  return (
    <Image src="http://facebook.github.io/react/img/logo.svg" />
  )
}

Props

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.