@tarragon/squarify-image
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Build Status MIT License Contributors LinkedIn

Squarify Image

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.

Package Sidebar

Install

npm i @tarragon/squarify-image

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

228 kB

Total Files

10

Last publish

Collaborators

  • shreya0712