1.0.3 • Published 6 months ago

@urami/react v1.0.3

Weekly downloads
-
License
-
Repository
github
Last release
6 months ago

@urami/react

Optimized image component for React.

Documentation

Usage

import Image from '@urami/react'

const Component = () => {
  return (
    <Image
      src="https://demo.rayriffy.com/tom-scott.jpg"
      width={801}
      height={801}
      alt="Tom Scott"
      className="rounded-xl shadow-md"
    />
  )
}

Props

NameTypeDefaultRequiredDescription
srcstring-Source of the image
widthnumber-Width of the image
heightnumber-Height of the image (Specify this will results in less layout shift)
qualitynumber75Quality of the image
loaderfndefaultLoaderLoader function, please refer to Loader