Elements

Components

Image

A framed picture: while the source loads, the frame keeps the skeleton's breath; the picture dissolves in when it lands; a broken source leaves the fallback slot — or the placeholder glyph when the caller has nothing local to say. The frame's size is the consumer's to give.

#Basic usage

image/basic Vue React
A photograph from the archive
image/error Vue React
A missing photograph
A missing photograph
image/fits Vue React
Cover crops to fill
Cover crops to fill
Contain keeps the whole
Contain keeps the whole
Fill stretches
Fill stretches

#Props

#Image

PropTypeDefaultDescription
srcString—
altString""—
fitString as PropType<ImageProps["fit"]>"cover"—
loadingString as PropType<ImageProps["loading"]>"lazy"—