Skip to main content

Image

Components

Image()

Image(props, context?): ReactNode

The Image component offers a simple yet efficient way to include an image in your app. The component makes use of lazy loading and async decoding so that the browser will only load your image when needed and decode it asyncronously so as to avoid blocking other elements from rendering. The Image component accepts all the props a normal HTML <img> tag accepts, plus more:

Parameters

ParameterType
propsImageProps
context?any

Returns

ReactNode

Example

  <Image customStyle="object-contain rounded-2xl" src={`${publicImgPath}/${imageName}`} />

Source

libs/design-system-core/src/components/Image/index.tsx:24

Props

ImageProps

ImageProps: PropsWithChildren<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> & object>

Source

libs/design-system-core/src/components/Image/index.tsx:4