Default
Custom Width
Override the default width with a className.
Gallery
Multiple image cards arranged in a flex layout.
Custom Alt Text
Provide an explicit alt prop for accessibility when the caption is not descriptive enough.
Props
| Prop | Type | Description |
|---|---|---|
| imageUrl | string | URL of the image to display |
| caption | string | Caption text rendered below the image |
| alt | string | Alt text for the image (defaults to caption) |
| className | string | Additional classes on the root figure element |
Usage
<ImageCard
imageUrl="/images/photo.jpg"
caption="A descriptive caption for the image."
alt="Detailed alt text for accessibility"
className="w-[300px]"
/>