Docs
Image
Image
An image component.
Installation
pnpm dlx shadcn@latest add "https://akasha-ui.pages.dev/r/styles/default/image.json"
Usage
import { Image } from "<path-to-ui-components>/image";
<Image
showLoadingIndicator={true}
src="https://picsum.photos/200/300"
alt="Example"
width={256}
height={256}
>
<ImageFallback>
<div className="w-full p-2 h-full flex items-center justify-center bg-gray-200 text-gray-500">
Failed to load image
</div>
</ImageFallback>
</Image>
Props
Name | Type | Description |
---|---|---|
showLoadingIndicator | boolean | Checks if the loading indicator should be displayed. |