1.0.6 • Published 3 years ago

react-fit-image v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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

propsdefault value / usedescription
imgProps{src="path/img.png",alt:"profile",title="profile"}pass html props for image
width"200px" or relative sizewidth of container
height"200px" or relative sizeheight of container
blur"8px"background blur value
borderRadius0pxborder radius for container

Examples

Use Cases