1.0.3 • Published 4 years ago

@tarragon/squarify-image v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Build Status MIT License Contributors LinkedIn

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.