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.
| Type | Description | |
|---|---|---|
src | string | (required) The URL of the image. |
alt | string | (required) Text alternative for the image, read by screen readers. Use an empty string (alt="") for decorative images. |
skeleton | boolean | (optional) If set to true, an overlaying skeleton with animation will be shown. |
imgClass | string | (deprecated) Deprecated. Use imageClassName instead. |
imageClassName | string | (optional) Custom className for the inner img element. |
figureProps | HTMLProps<HTMLElement> | (optional) Native HTML properties for the wrapping figure element. |
element | HTMLElement string | (deprecated) Deprecated. The wrapper should remain a figure to preserve its semantics. |
caption | string | (optional) Use to define a caption for the image. Uses <figcaption>. |
loading | "eager" "lazy" | (optional) Can either be eager or lazy. Defaults to eager. |
Space | string object | (optional) Spacing properties like top or bottom are supported. |