Skip to Content
DocsResourcesPricingShowcase

Image

Used to display images

Dan Abramov

import { Image } from '@saas-ui/react'
<Image src="..." />

Use the height prop to change the height of the image component.

Here's an example of how to render a circular image.

Naruto Uzumaki

Use the aspectRatio prop to change the aspect ratio of the image component.

Naruto vs Sasuke

By default, the image applies object-fit: cover. Use the fit prop to change the fit of the image component.

Use the asChild prop to render the image as a child of the Image component.

// import NextImage from "next/image"

<Image asChild>
  <NextImage src="..." alt="..." />
</Image>

The Image component supports all native props for the img element.

Previous

Icon Badge

Next

Input