• Meet OMA at Smart City Expo World Congress • Barcelona • 3–5 November 2026 • Hall 3, Street F, Stand 90 •
• Live LwM2M demos • Water 2.0 panel • Smart City SIG sessions •

💧 OMA Utilities WG • Water 2.0 has launched • Utility Membership •

🏙️ OMA Conformance Tool • Apply for Early Access •


Image Container

Usage

The constructor creates a display format showcasing an image and an optional caption. This constructor is mainly used with .svg image file types, to create a more unified look and feel when displaying those formats.

This constructor inverts colors in dark mode, so any other image inserted will have its colors inverted. Works best with white/black colors.

Basic

Sample Image

This is an example caption for the image.

::ShImgContainer
---
urlImage: /images/lwm2m/overall_architecture.drawio.svg
altImage: Sample Image
figcaption: |
    This is an example caption for the image.
---
::

Advanced settings

An example with customized ui attributes for enhanced display:

Custom Image

This is a custom caption with styled text.

::ShImgContainer
---
ui:
  wrapper: shadow-lg bg-purple-300 dark:bg-purple-900 p-4 rounded-xl
  image: rounded-lg border border-gray-300
  figcaption: text-lg text-gray-600 italic
urlImage: /images/lwm2m/overall_architecture.drawio.svg
altImage: Custom Image
figcaption: |
    This is a custom caption with styled text.
---
::

Props

PropTypeDefaultDescription
descriptionstring""Note for content writers. It is not rendered on the website.
urlImagestring–The source URL of the image to be displayed.
altImagestring–Alternative text for the image, used for accessibility and in case the image fails to load.
figcaptionstring–Optional caption text displayed below the image. This includes font size, color, and alignment settings.
uiRecord<string, any>–Overrides the default classes of the UI config below. Values are merged with the defaults using tailwind-merge.

Slots

This component has no slots.

UI config

Default classes of every styled element. Override any key through the ui prop.

KeyDefault classesDescription
wrapperflex-rowDefines the overall styling for the container that holds both the image and its caption.
innerbg-white dark:bg-black pt-3 pb-3 mx-4 md:mx-32 rounded-mdStyles applied to the inner section that holds the image.
basedark:invert flex flex-col justify-center items-center m-4A placeholder for additional base styles that can be applied to the image component.
image""Styles applied to the image itself, including size, alignment, and additional effects like borders or shadows.
figcaptionflex justify-center italic text-neutral-600 dark:text-neutral-400Image caption.