react-fit-image

1.0.6 • Public • Published

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

Examples

Use Cases

Package Sidebar

Install

npm i react-fit-image

Weekly Downloads

16

Version

1.0.6

License

MIT

Unpacked Size

44.6 kB

Total Files

4

Last publish

Collaborators

  • pk12121996