0.1.2 • Published 7 years ago

react-aspect-image v0.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

react-aspect-image

A ReactJS image component to dynamically display image in original image ratio.

Installation

npm install react-aspect-image --save

or

yarn add react-aspect-image

Usage

You can use AspectImage almost the same way as a and it will handle the image size for you.

import AspectImage from 'react-aspect-image';
...
<AspectImage
  src="image_url"
  fallback="image_url" //If your image failed to load, it will display this image, optional
  alt="awesome image"
  dimention={{height: 100, width:100}}  // specify your image dimention
/>
...

To-Do

  • aspect-mode
  • aspect-fill-mode
  • detect mode

Notes

This is my first ever open source project. Please correct me if you see any mistakes (should be easy to find). :)

License

MIT License

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago