Skip to content

Some properties provide flexibility for specific integrations. Follow the component's usage guidance. Customizations beyond the documented patterns need a use case approved by DNB UX. Read about intended use and customization.

Properties#

className targets the wrapping figure element. All other native image properties target the inner img element. Use figureProps to pass additional native properties to the wrapper.

TypeDescription
srcstring(required) The URL of the image.
altstring(required) Text alternative for the image, read by screen readers. Use an empty string (alt="") for decorative images.
skeletonboolean(optional) If set to true, an overlaying skeleton with animation will be shown.
imgClassstring(deprecated) Deprecated. Use imageClassName instead.
imageClassNamestring(optional) Custom className for the inner img element.
figurePropsHTMLProps<HTMLElement>(optional) Native HTML properties for the wrapping figure element.
elementHTMLElement
string
(deprecated) Deprecated. The wrapper should remain a figure to preserve its semantics.
captionstring(optional) Use to define a caption for the image. Uses <figcaption>.
loading"eager"
"lazy"
(optional) Can either be eager or lazy. Defaults to eager.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.
Suggest an edit