Image
ratio: square, video, photo. fit is cover (the default, fills the box) or contain (shows the whole image).


Fallback. If the image fails to load, a labelled box of the same size is shown instead (fallback sets its content). It tries again when src changes.

Props
srcstringImage URL.
altstringAlternative text.
ratio'square' | 'video' | 'photo'Fixed aspect ratio.
fit'cover' | 'contain'Default:'cover'How the image fills its box.
fallbackReactNodeDefault:'Image unavailable'Shown if loading fails.
classNamestringDefault:''Extra classes for the root element.
...restAny other props are passed to the underlying element.
| Prop | Type | Default | Description |
|---|---|---|---|
src | string | – | Image URL. |
alt | string | – | Alternative text. |
ratio | 'square' | 'video' | 'photo' | – | Fixed aspect ratio. |
fit | 'cover' | 'contain' | 'cover' | How the image fills its box. |
fallback | ReactNode | 'Image unavailable' | Shown if loading fails. |
className | string | '' | Extra classes for the root element. |
...rest | – | Any other props are passed to the underlying element. |