@tarragon/squarify-image
v1.0.3
Published
[![Build Status][build-shield]]() [![MIT License][license-shield]][license-url] [![Contributors][contributors-shield]]() <img src="https://img.badgesize.io/shreya0712/squarify-image/master/build/index.js.gz?style=for-the-badge&compression=gzip&label=gzip+
Downloads
3
Maintainers
Readme
Easy to use image component where the image takes up entire height and width of the containing element, while maintaining its aspect ratio by filling up extra space with blurred background.
Getting Started
Prerequisites
Following Peer Dependency is required for using this library:
- react: ^16.12.0
Installation
npm install @tarragon/squarify-image --save
or
yarn add @tarragon/squarify-image
Usage
Example
Checkout the basic usage here.
Quick Usage
Make sure to use the component within a container element whose dimensions shall be inherited by the image.
<div className="img-container">
<Squarify image={url} />
</div>
Import the Squarify component and pass the href property for the image.
Built With
License
Distributed under the MIT License. See LICENSE
for more information.