> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/dynamic-components/components/media-object.md).

# Media Object

## Overview

The Media Object component uses three slots to organize your content:

* **Figure (Left):** Place an image, icon, or other media that appears on the left side of the content.
* **Content:** The main area for your text content, positioned alongside the figure.
* **Figure Inverse (Right):** An alternative media area that appears on the right side of the content.

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2Fgit-blob-0bc270bf03ea552366713d1c7d4d3f5948040f21%2F2025-03-12_20-17-53%20(1).gif?alt=media" alt=""><figcaption><p>Media Object and Slots disposal</p></figcaption></figure>

**Example Use Cases**

* **Product Listings:** Display product images alongside their descriptions and prices.
* **News Articles:** Show article images or author avatars next to the text.
* **User Profiles:** Present user avatars with their names and details.
* **Call-to-Action Sections:** Combine images with compelling text and buttons.

## Projects

See how Media Object fits into a complete Salesforce workflow. This project includes steps to build it with AI or manually.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><h4><a href="https://docs.avonnicomponents.com/projects/use-cases/outside-data/contact-local-weather">Contact Local Weather</a></h4></td><td>Build a weather app using Dynamic components, Flow and standard HTTP actions.</td><td data-object-fit="fill"><a href="https://3857391697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdHOej9Pd5IxJNGEJMZKW%2Fuploads%2FKZVpXYD90xLiay0YkaNR%2Fcontact-local-weather-cover.webp?alt=media">https://3857391697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdHOej9Pd5IxJNGEJMZKW%2Fuploads%2FKZVpXYD90xLiay0YkaNR%2Fcontact-local-weather-cover.webp?alt=media</a></td></tr></tbody></table>

## Configuration

To configure the Media Object, select it on the canvas. The configuration panel opens on the right. The sections below mirror the Properties tab.

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FbHIkbxTgpsCb42Z5htA1%2Fmedia-object-builder-properties.png?alt=media" alt="The Properties tab of the Edit Media Object panel" width="320"><figcaption><p>The whole Properties tab. The Media Object has no Interactions tab, only Properties and Style.</p></figcaption></figure>

### Properties

#### Inline

When enabled, the Media Object shrinks to fit its content instead of spanning the full width, and the figure moves above the body instead of sitting beside it. Leave it off to keep the figure and the body side by side.

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FdlnEpym9psd0bROz3SGo%2Fmedia-object-inline.png?alt=media" alt="The Media Object with Inline off and on"><figcaption><p>With <strong>Inline</strong> off, the figure sits beside the body. With it on, the component shrinks to its content and the figure moves above the body.</p></figcaption></figure>

Because Inline stacks the figure above the body, **Vertical Align** only has a visible effect when Inline is off.

#### Responsive

When enabled, the layout automatically adapts to different screen sizes, optimizing the display for both desktop and mobile views.

#### Vertical Align

Controls how the figure and body are aligned vertically within the container. Options: **Start** (top), **Center**, and **End** (bottom). Defaults to **Start**. Requires **Inline** to be off.

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FX6wDRefdpDGh99VhuPC0%2Fmedia-object-vertical-align.png?alt=media" alt="The three Vertical Align values on the same media object"><figcaption><p>The three values of <strong>Vertical Align</strong>, with a figure shorter than its body.</p></figcaption></figure>

#### Size

Controls the overall size of the Media Object. Options: **Small**, **Medium** (default), and **Large**. Size sets the spacing between the figure and the body.

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FtlqDUm6QvQ85Rrqdp7Hd%2Fmedia-object-size.png?alt=media" alt="The three Size values on the same media object"><figcaption><p>The three values of <strong>Size</strong>, which widen the gap between the figure and the body.</p></figcaption></figure>

### Set Component Visibility

All components support conditional visibility — see [Component Visibility](https://docs.avonnicomponents.com/dynamic-components/core-concepts/component-visibility.md).

## Styling

Configure the Media Object's appearance from the **Style** tab of the Edit Media Object panel.

{% tabs %}
{% tab title="Margin" %}
Controls the *outer* spacing around the component.

* **Top / Right / Bottom / Left:** Adjust the space on each side.
  {% endtab %}

{% tab title="Padding" %}
Controls the *inner* spacing between the component's content and its edges.

* **Top / Right / Bottom / Left:** Adjust the inner spacing on each side.
  {% endtab %}
  {% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.avonnicomponents.com/dynamic-components/components/media-object.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
