Image

Image with loading skeleton, fallback, aspect ratio, caption, and border radius.

Installation

Examples

Variants

cover, contain, and fallback modes.

landscape

Cover

avatar

Full radius

Fallback

With caption

Figure with accessible figcaption.

mountain
Captured at 5:47 AM in the Swiss Alps.

API Reference

PropTypeDefaultDescription
src*stringrequiredImage source URL.
alt*stringrequiredAccessible description.
fallbackReactNodeShown when the image fails to load.
aspectRationumberWidth/height ratio.
objectFit'cover'|'contain'|'fill''cover'CSS object-fit value.
captionstringFigure caption.
rounded'none'|'sm'|'md'|'lg'|'xl'|'full''md'Border radius.