Image

The Image component provides a reusable pattern for image in the interface.

Plain image

Just a plain image

This is a image
Hey, I am a caption for an image

Image in modal

This image can be opened in a modal by clicking it.

This is a image
Click image to open a modal with a bigger image example

Rounded corners

An image with border radius for rounded corners

This is a image
Image with rounded corners (default size: md)

Missing plain image

Image not found but rendered as a placeholder.

Full width image

Image in full width mode.

This is a image

Cover image

Image with cover mode, that covers the parent container.

This is a image

API

Parameter Default Description
false A string containing a valid URL or an ImageInterface object. If the object is used, the srcset attribute is ignored.
false A string containing a valid srcset attribute. Ignored if src is an ImageInterface object.
Alt text of the imag. May override the alt text of the ImageInterface object.
Image caption. That will be visible for the user.
false Removes the visible caption. The caption may still be used as an alt-text for the image.
Byline for additional information, placed under the caption
false If the image should obtain the --full-width modifier.
false If the image should obtain the --cover modifier.
false Border radius of the image, false for no radius. Accepted values are xs, sm, md, lg, full (circle)
true If the placeholder should be enabled, if false, the component will not render at all if the src is empty
false Label to show if image is missing
broken_image Icon to display if image is missing / false to hide
xxl Icons size, please refer to image component for size.
[] Attributes for the img element.
true If the low quality image placeholder should be enabled.
true If the aspect ratio should be calculated based on the image dimensions. This option will be ignored if cover is set to true.

CSS API

Variable Default Type Values Description
var(--space) range - Base spacing unit. Used for padding and margin inside components.
var(--border-radius) range - Border Radius
var(--color--background) color - Background
var(--color--surface) color - Surface
var(--border-width) range - Size
var(--color--surface-border) color - Manual companion token for borders on surface elements.
var(--color--surface-contrast) color - Used for text and icons on surface backgrounds with less contrast.
var(--corner-shape) select square, round, squircle, circular, bevel, scoop Corner Shape
var(--font-weight-bold) select 600, 700, 800, 900 Bold Weight
var(--font-size-90) range - One step below base in the type scale.