react-fit-image
v1.0.6
Published
A module to fit image in any size container
Downloads
19
Maintainers
Readme
react-fit-image
This module fits images of any size into a container so aesthetically. Please refer examples and use cases.
Avoid
Move away from the tiresome ways of stretching, scaling and resizing of images to fit into a container.
Usage
<Image
imgProps={{
src:"path/img.png",
alt:"profile",
title:"profile"
}}
width="300px"
height="200px"
borderRadius="10%"
/>
Props
| props | default value / use | description | | ------------ | -------------------------------------------------- | --------------------------- | | imgProps | {src="path/img.png",alt:"profile",title="profile"} | pass html props for image | | width | "200px" or relative size | width of container | | height | "200px" or relative size | height of container | | blur | "8px" | background blur value | | borderRadius | 0px | border radius for container |