Image Block

Image Block

Download

npx github-download-directory carllosnc/cn-react-thekit src/components/ImageBlock

Import

import { ImageBlock } from '@/components'

Dependencies

React Lazy Load Component

npm i -S react-lazy-load

Usage

<ImageBlock className="max-w-[400px]" width={300} height={200} bgColor="#E7204D" src="image-source-path" />

Props

Block image extends React.ImgHTMLAttributes<HTMLImageElement> then you can use all <img /> properties.

nametypedefaultdescription
bgColorstring(hex)undefinedbackdrop that will show when image is loading