OTTODesign System

Components

Media object card

A media object card is an interactive container that can be used for category entries, customer benefits or other compatible teasers. Media object cards are always fully interactive and only link to one target.

Configurator

LiveMedia object card: variant, size, colours, layout, content and action signifier
WohnzimmerSofas, Tische und Leuchten
HTML
<oc-media-object-card-v2 elevation-level="stacked" icon="order-return" style="width:min(100%,480px)"><a href="#" aria-label="oc-auto"></a><picture slot="img"><img alt="" style="margin:0;height:100%" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg"></picture><span slot="headline">Wohnzimmer</span><span slot="subline">Sofas, Tische und Leuchten</span><oc-action-signifier-v1 slot="action-signifier" label="Ansehen" variant="icon" hidden="hidden"></oc-action-signifier-v1></oc-media-object-card-v2>

Usage

Anatomy

WohnzimmerNeu im Shop
LiveAnatomy
HTML
<div class="on-frame"><div style="max-width:400px;margin:0 auto">
<oc-media-object-card-v2><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2>
</div>

Variants

The media object card is available in the following sizes:

  • 100
  • 75
  • 50
  • 25

You can use the media object card with text only, an icon or an image . For the image you can place either an ambient or a cutout image.

You can also choose between the default and inverted variant of the media object card. The default variant has black text and a black icon. Meanwhile the inverted variant features white text and a white icon. The default and inverted background color can be freely overwritten. But make sure to meet sufficient contrast due to the accessibility standards.

You can optionally add an action signifier as text or icon to increase the affordability of the media object card.

Size 100

WohnzimmerNeu im Shop

Size 75

WohnzimmerNeu im Shop

Size 50

WohnzimmerNeu im Shop

Size 25

WohnzimmerNeu im Shop
LiveSizes 25, 50, 75 & 100
HTML
<div class="on-frame" style="display:grid;grid-template-columns:1fr 1fr;gap:32px 24px;align-items:center">
<p class="demo-label">Size 100</p><oc-media-object-card-v2 size="100"><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2></div>
<p class="demo-label">Size 75</p><oc-media-object-card-v2 size="75"><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2></div>
<p class="demo-label">Size 50</p><oc-media-object-card-v2 size="50"><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2></div>
<p class="demo-label">Size 25</p><oc-media-object-card-v2 size="25"><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2></div>

Text only

VersandKostenlos ab 29 €

Image ambient

WohnzimmerBis zu -30 %

Icon

KundenserviceWir helfen dir gern

Image cutout

SneakerBis zu -30 %
LiveIcon or image
HTML
<div class="on-frame" style="display:grid;grid-template-columns:1fr 1fr;gap:24px">
<p class="demo-label">Text only</p><oc-media-object-card-v2 variant="text-only"><a href="#" aria-label="oc-auto"></a><span slot="headline">Versand</span><span slot="subline">Kostenlos ab 29 €</span></oc-media-object-card-v2></div>
<p class="demo-label">Image ambient</p><oc-media-object-card-v2 variant="ambient-image" inverted><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Bis zu -30 %</span></oc-media-object-card-v2></div>
<p class="demo-label">Icon</p><oc-media-object-card-v2 variant="icon" icon="smiley-happy"><a href="#" aria-label="oc-auto"></a><span slot="headline">Kundenservice</span><span slot="subline">Wir helfen dir gern</span></oc-media-object-card-v2></div>
<p class="demo-label">Image cutout</p><oc-media-object-card-v2 variant="cut-out-image" inverted><a href="#" aria-label="oc-auto"></a><picture slot="img"><img src="/previews/imagery/samples/otto-product-still/product-sneaker.webp" alt="" style="margin:0;height:100%"></picture><span slot="headline">Sneaker</span><span slot="subline">Bis zu -30 %</span></oc-media-object-card-v2></div>
WohnzimmerNeu im Shop WohnzimmerBis zu -30 %
LiveDefault and inverted
HTML
<div class="on-frame" style="display:grid;grid-template-columns:1fr 1fr;gap:24px">
<oc-media-object-card-v2><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2>
<oc-media-object-card-v2 inverted><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Bis zu -30 %</span></oc-media-object-card-v2>
WohnzimmerNeu im Shop WohnzimmerBis zu -30 % WohnzimmerNeu im Shop WohnzimmerBis zu -30 %
LiveAction signifier (icon or link)
HTML
<div class="on-frame" style="display:grid;grid-template-columns:1fr 1fr;gap:16px 24px">
<oc-media-object-card-v2><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span><oc-action-signifier-v1 slot="action-signifier" variant="icon"></oc-action-signifier-v1></oc-media-object-card-v2>
<oc-media-object-card-v2 inverted><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Bis zu -30 %</span><oc-action-signifier-v1 slot="action-signifier" variant="icon" inverted></oc-action-signifier-v1></oc-media-object-card-v2>
<oc-media-object-card-v2><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span><oc-action-signifier-v1 slot="action-signifier" variant="text" label="Ansehen"></oc-action-signifier-v1></oc-media-object-card-v2>
<oc-media-object-card-v2 inverted><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Bis zu -30 %</span><oc-action-signifier-v1 slot="action-signifier" variant="text" label="Ansehen" inverted></oc-action-signifier-v1></oc-media-object-card-v2>

Behavior

States

Enabled

WohnzimmerNeu im Shop

Hover (shown)

WohnzimmerNeu im Shop

Pressed (shown)

WohnzimmerNeu im Shop

Selected

WohnzimmerNeu im Shop

Focus (shown)

WohnzimmerNeu im Shop
LiveStates
HTML
<div class="on-frame" style="display:grid;grid-template-columns:1fr 1fr;gap:24px">
<p class="demo-label">Enabled</p><oc-media-object-card-v2><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2></div>
<p class="demo-label">Hover (shown)</p><oc-media-object-card-v2 style="background-image:linear-gradient(var(--oc-semantic-color-overlay-hover),var(--oc-semantic-color-overlay-hover))"><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2></div>
<p class="demo-label">Pressed (shown)</p><oc-media-object-card-v2 has-action-child-active><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2></div>
<p class="demo-label">Selected</p><oc-media-object-card-v2><a href="#" aria-current="page" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2></div>
<p class="demo-label">Focus (shown)</p><oc-media-object-card-v2 style="outline:2px solid var(--oc-semantic-focus-outline-color);outline-offset:2px"><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2></div>

For information on states, refer to foundations.

Typography

Each size of the media object cards has different limitation of lines for the headline and subline. It follows the logic that the lines always start with the headline and that the remaining lines are filled with the subline.

Size 100

Wohnzimmer, Esszimmer und ArbeitszimmerSofas, Tische, Stühle und Leuchten für dein Zuhause

Size 75

Wohnzimmer, Esszimmer und ArbeitszimmerSofas, Tische, Stühle und Leuchten für dein Zuhause

Size 50

Wohnzimmer, Esszimmer und ArbeitszimmerSofas, Tische, Stühle und Leuchten für dein Zuhause

Size 25

Wohnzimmer, Esszimmer und ArbeitszimmerSofas, Tische, Stühle und Leuchten für dein Zuhause
LiveText-scaling and truncation
HTML
<div class="on-frame" style="display:grid;grid-template-columns:repeat(2,minmax(0,300px));gap:32px 24px;justify-content:center;align-items:start">
<p class="demo-label">Size 100</p><oc-media-object-card-v2 size="100"><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer, Esszimmer und Arbeitszimmer</span><span slot="subline">Sofas, Tische, Stühle und Leuchten für dein Zuhause</span></oc-media-object-card-v2></div>
<p class="demo-label">Size 75</p><oc-media-object-card-v2 size="75"><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer, Esszimmer und Arbeitszimmer</span><span slot="subline">Sofas, Tische, Stühle und Leuchten für dein Zuhause</span></oc-media-object-card-v2></div>
<p class="demo-label">Size 50</p><oc-media-object-card-v2 size="50"><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer, Esszimmer und Arbeitszimmer</span><span slot="subline">Sofas, Tische, Stühle und Leuchten für dein Zuhause</span></oc-media-object-card-v2></div>
<p class="demo-label">Size 25</p><oc-media-object-card-v2 size="25"><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer, Esszimmer und Arbeitszimmer</span><span slot="subline">Sofas, Tische, Stühle und Leuchten für dein Zuhause</span></oc-media-object-card-v2></div>

In general, the media object card prefers that the text (headline and subline) is placed next to each other. When this is no longer possible, they are placed one below the other. You can also use the "prefer vertical alignment" option. This will always place the text below each other.

Default

WohnzimmerNeu im Shop

Prefer vertical alignment

WohnzimmerNeu im Shop
LivePrefer vertical alignment
HTML
<div class="on-frame" style="display:grid;grid-template-columns:1fr 1.3fr;gap:16px;align-items:end">
<p class="demo-label">Default</p><oc-media-object-card-v2><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2></div>
<p class="demo-label">Prefer vertical alignment</p><oc-media-object-card-v2 prefer-vertical-alignment><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2></div>

Fitting

For the width of the media object card you can either choose fit-content or fill-parent. The height of the media object card depends on the size and is always fixed.

fit-content

WohnzimmerNeu im Shop

fill-parent

WohnzimmerNeu im Shop
LiveFit-content and fill-parent
HTML
<div class="on-frame" style="display:grid;grid-template-columns:1fr 1fr;gap:32px;align-items:end">
<p class="demo-label">fit-content</p><div><oc-media-object-card-v2 width-behavior="fit"><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2></div></div>
<p class="demo-label">fill-parent</p><oc-media-object-card-v2 width-behavior="fill"><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2></div>

Placement

Media object card are mostly used within a cinema or with multiple instances next to each other. When placing multiple media object cards side by side you should use the same size. You can also use the media object card standalone but consider that the width on desktop gets pretty big.

Inside a cinema

WohnzimmerNeu im Shop KinderzimmerNeu im Shop BücherNeu im Shop ModeNeu im Shop

Multiple instances

WohnzimmerNeu im Shop KinderzimmerNeu im Shop BücherNeu im Shop

Standalone

WohnzimmerNeu im Shop
LivePlacing inside cinema, with multiple instances or standalone
HTML
<div class="on-frame" style="display:grid;grid-template-columns:minmax(0,1fr);gap:24px">
<oc-cinema-v1 oc-aria-label="Kategorien" items-per-page="2">
  <oc-media-object-card-v2><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2>
  <oc-media-object-card-v2><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-kinderzimmer.jpg" alt=""><span slot="headline">Kinderzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2>
  <oc-media-object-card-v2><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-buecher-sortiment.jpg" alt=""><span slot="headline">Bücher</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2>
  <oc-media-object-card-v2><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-fashion-drop-mojo-06.jpg" alt=""><span slot="headline">Mode</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2>
</oc-cinema-v1>
<div style="display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px">
  <oc-media-object-card-v2 prefer-vertical-alignment><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2>
  <oc-media-object-card-v2 prefer-vertical-alignment><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-kinderzimmer.jpg" alt=""><span slot="headline">Kinderzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2>
  <oc-media-object-card-v2 prefer-vertical-alignment><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-buecher-sortiment.jpg" alt=""><span slot="headline">Bücher</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2>
<oc-media-object-card-v2><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2>
Elevation

Media object cards are placed on top of the frame (level 0) inside the canvas (level 1). Media object cards can also be placed on top of the canvas (level 1.5) as stacked media object card. You can use stacked media object cards when you want to place a card inside a block. Therefore, stacked media object cards have a different background color (stacked background).

Default, on frame

WohnzimmerNeu im Shop

Stacked, inside a block

WohnzimmerNeu im Shop
LiveDefault and stacked
HTML
<div class="on-frame" style="display:grid;grid-template-columns:1fr 1fr;gap:32px;align-items:center">
<p class="demo-label">Default, on frame</p><oc-media-object-card-v2><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2></div>
<oc-block-v2><div class="group"><p class="demo-label">Stacked, inside a block</p><oc-media-object-card-v2 elevation-level="stacked"><a href="#" aria-label="oc-auto"></a><img slot="img" src="/references/images/otto/otto-shop-teaser-wohnzimmer.jpg" alt=""><span slot="headline">Wohnzimmer</span><span slot="subline">Neu im Shop</span></oc-media-object-card-v2></div></oc-block-v2>

Responsiveness

In principle, the media object card behaves in the same way across all breakpoints. The only exception is size 100, where the headline in breakpoint S is set as headline 100 and from breakpoint L it becomes headline200.

Responsiveness
Responsive behavior on the different breakpoints

Best practices

WohnzimmerNeu im Shop WohnzimmerBis zu -30 %
DoUse the default colors or the provided semantic tokens "color/background-card" when using the inverted variant of the media object card.
WohnzimmerNeu im Shop KinderzimmerNeu im Shop
Don'tUse a custom colored background for the media object card.
WohnzimmerNeu im Shop KinderzimmerNeu im Shop
DoOnly use the same sizes of the media object card within a feature.
WohnzimmerNeu im Shop KinderzimmerNeu im Shop
Don'tMix different sizes of the media object card with a feature.
WohnzimmerNeu im Shop
CautionAvoid placing inverted media object cards on colored blocks or colored backgrounds.

Accessibility

For information on accessibility, refer to thetechnical documentation.

Implementation

Live demo

Wie können wir dir helfen?

Bestellung verfolgenWo ist mein Paket? Artikel zurücksenden30 Tage kostenlos Rechnung und ZahlungRechnung oder Raten KundenserviceMo bis Sa, 8 bis 20 Uhr

Zuletzt angesehen

Verlauf löschen
Sneaker »Court«79,99 € Kopfhörer »Studio«98,99 € Sessel »Lounge«449,99 €
LiveReal OTTO components, rendered by the OTTO component runtime
HTML
<div class="on-frame demo-stack" style="gap:32px">
<p class="oc-headline-200" style="margin:0">Wie können wir dir helfen?</p>
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(15rem,1fr));gap:16px">
  <oc-media-object-card-v2 size="75" prefer-vertical-alignment variant="icon" icon="order"><a href="#" aria-label="oc-auto"></a><span slot="headline">Bestellung verfolgen</span><span slot="subline">Wo ist mein Paket?</span><oc-action-signifier-v1 slot="action-signifier" variant="icon"></oc-action-signifier-v1></oc-media-object-card-v2>
  <oc-media-object-card-v2 size="75" prefer-vertical-alignment variant="icon" icon="order-return"><a href="#" aria-label="oc-auto"></a><span slot="headline">Artikel zurücksenden</span><span slot="subline">30 Tage kostenlos</span><oc-action-signifier-v1 slot="action-signifier" variant="icon"></oc-action-signifier-v1></oc-media-object-card-v2>
  <oc-media-object-card-v2 size="75" prefer-vertical-alignment variant="icon" icon="payment-invoice"><a href="#" aria-label="oc-auto"></a><span slot="headline">Rechnung und Zahlung</span><span slot="subline">Rechnung oder Raten</span><oc-action-signifier-v1 slot="action-signifier" variant="icon"></oc-action-signifier-v1></oc-media-object-card-v2>
  <oc-media-object-card-v2 size="75" prefer-vertical-alignment variant="icon" icon="person-callcenter"><a href="#" aria-label="oc-auto"></a><span slot="headline">Kundenservice</span><span slot="subline">Mo bis Sa, 8 bis 20 Uhr</span><oc-action-signifier-v1 slot="action-signifier" variant="icon"></oc-action-signifier-v1></oc-media-object-card-v2>
<div style="display:flex;justify-content:space-between;align-items:baseline;gap:12px"><p class="oc-headline-200" style="margin:0">Zuletzt angesehen</p><oc-link-v2><a href="#">Verlauf löschen</a></oc-link-v2></div>
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(11rem,1fr));gap:16px">
  <oc-media-object-card-v2 size="75" prefer-vertical-alignment variant="cut-out-image"><a href="#" aria-label="oc-auto"></a><picture slot="img"><img src="/previews/imagery/samples/otto-product-still/product-sneaker.webp" alt="" style="margin:0;height:100%"></picture><span slot="headline">Sneaker »Court«</span><span slot="subline">79,99 €</span><oc-action-signifier-v1 slot="action-signifier" variant="icon"></oc-action-signifier-v1></oc-media-object-card-v2>
  <oc-media-object-card-v2 size="75" prefer-vertical-alignment variant="cut-out-image"><a href="#" aria-label="oc-auto"></a><picture slot="img"><img src="/previews/imagery/samples/otto-product-still/product-headphones.webp" alt="" style="margin:0;height:100%"></picture><span slot="headline">Kopfhörer »Studio«</span><span slot="subline">98,99 €</span><oc-action-signifier-v1 slot="action-signifier" variant="icon"></oc-action-signifier-v1></oc-media-object-card-v2>
  <oc-media-object-card-v2 size="75" prefer-vertical-alignment variant="cut-out-image"><a href="#" aria-label="oc-auto"></a><picture slot="img"><img src="/previews/imagery/samples/otto-product-still/product-armchair.webp" alt="" style="margin:0;height:100%"></picture><span slot="headline">Sessel »Lounge«</span><span slot="subline">449,99 €</span><oc-action-signifier-v1 slot="action-signifier" variant="icon"></oc-action-signifier-v1></oc-media-object-card-v2>

Code

Version Tag Status API
v2 <oc-media-object-card-v2> Stable MediaObjectCardV2
v1 <oc-media-object-card-v1> Deprecated MediaObjectCardV1

API

API: <oc-media-object-card-v2> (MediaObjectCardV2)

The media object card component is a versatile UI element that combines media (like images or icons) with textual content (headline and subline) to create an engaging and informative card layout. It can be used in various contexts, such as displaying product information, user profiles, or any content that benefits from a visual representation alongside text.

Attributes / properties
Attribute Type Default Required Description
variant "icon" | "ambient-image" | "cut-out-image" | "text-only" "ambient-image" no The variant of the media object card
size "50" | "100" | "25" | "75" "100" no Sets the size of the media object card
icon icon name undefined no Sets the icon of the media object card.
inverted boolean false no Sets the media-object-card styles to be inverted.
width-behavior "fill" | "fit" "fill" no Defines the width behavior of the media card component. - "fill": The component expands to fill the available width. - "fit": The component width fits its content.
prefer-vertical-alignment boolean false no Prefers vertical alignment of text whenever possible.
single-line boolean false no Whether the content should be shown in a single line
elevation-level "canvas" | "stacked" | "above" | "sticky" "canvas" no Sets the elevation level of the card. The elevation level determines the shadow and depth of the card. - canvas: no shadow, media-object-card appears flat, to be used on frame.

Note: Has no effect, when background-color or inverted has been set. - stacked: shadow, media-object-card appears stacked, to be used on canvas.

Note: Has no effect, when background-color or inverted has been set. - above: shadow, media-object-card appears above other levels. - sticky: shadow, media-object-card appears above all other levels and is sticky.
Slots
Slot Required Description
headline no Sets the main headline.
subline no Sets the subline of the media object card. Use this slot to display additional information or context about the media object card.
default no Accepts one of the following elements: - <input type="checkbox"> for multi-selection - <input type="radio"> for single-selection - <button role="switch"> for switch behavior - <button> for button behavior - <a href="#"> for link behavior - <div data-masked-ref="..."> for masked link behavior - <a data-masked-ref="..."> for link switching - aria-current on <button> or <a> for current-marked behavior

For more information on interactive components, refer to the interactive component slots documentation.
img no Sets an image.

Note: When variant is set to "cut-out-image", pass a <picture> element, not a bare <img>. The --cutout-overlay is rendered via a pseudo-element, which is not supported on replaced elements like <img> and will not appear.
action-signifier no Action signifier slot

For more information, see the action signifier documentation
Events
Event Detail type Description
oc-property-change OcMediaObjectCardV2Events["oc-property-change"] Whenever a property value changes, this event triggers. Use this event to track all property changes within the component.

Refer to the Events documentation for more information.
oc-mount { component: string; } Fired when the component is mounted to the DOM. The event is fired when the onMount hook of the component is called by the runtime.
oc-unmount { component: string; } Fired when the component is unmounted from the DOM. The event is fired when the function returned by the onMount hook of the component is called by the runtime.
CSS custom properties
Custom property Default Description
--background-color undefined Sets the custom background color
--cutout-overlay undefined Sets the background color of the cutout area

Note: Only applies when variant is set to "cut-out-image" and the img slot is a <picture> element. Not supported on a bare <img>.
--icon-color undefined Sets the custom icon color
--align-headline "baseline" Sets the alignment of the headline.

Note: The alignment of the headline is only applied when slots are aligned horizontally.
--align-subline "baseline" Sets the alignment of the subline.

Note: The alignment of the headline is only applied when slots are aligned horizontally.

Examples

Listed below are the most common variations of the mediaobjectcard component as well as specific component variations for different use cases.

Action Signifier

Variation using the action-signifier slot.

blue checkered background
Headline
Subline
HTML
<oc-media-object-card-v2 variant="ambient-image">
<img slot="img" src="https://www.otto.de/assets-storybook/assets/img-placeholder-100.DVwSxVZf.png" alt="blue checkered background">
<div slot='headline'>Headline</div>
<div slot='subline'>Subline</div>
<oc-action-signifier-v1 slot='action-signifier' variant='text' label='Action'></oc-action-signifier-v1>
</oc-media-object-card-v2>
With checked behavior

The media object card can be marked as checked using a checkbox, a radio button, a switch button, or a current-marked link in the default slot. See marking content as checked for guidance on choosing the right pattern.

Checkbox

blue checkered background
Headline
Subline
blue checkered background
Headline
Subline
blue checkered background
Headline
Subline

Radio button

blue checkered background
Headline
Subline
blue checkered background
Headline
Subline
blue checkered background
Headline
Subline

Switch button

blue checkered background
Headline
Subline
blue checkered background
Headline
Subline
blue checkered background
Headline
Subline

Current-marked link

blue checkered background
Headline
Subline
blue checkered background
Headline
Subline
blue checkered background
Headline
Subline
HTML
<h2>Checkbox</h2>
<div class="row">
<oc-media-object-card-v2 variant="ambient-image">
  <input type="checkbox" aria-label="oc-auto" />
  <img slot="img" src="https://www.otto.de/assets-storybook/assets/img-placeholder-100.DVwSxVZf.png" alt="blue checkered background"><div slot='headline'>Headline</div><div slot='subline'>Subline</div>
</oc-media-object-card-v2>
<oc-media-object-card-v2 variant="ambient-image">
  <input type="checkbox" aria-label="oc-auto" checked />
  <img slot="img" src="https://www.otto.de/assets-storybook/assets/img-placeholder-100.DVwSxVZf.png" alt="blue checkered background"><div slot='headline'>Headline</div><div slot='subline'>Subline</div>
</oc-media-object-card-v2>
<oc-media-object-card-v2 variant="ambient-image">
  <input type="checkbox" aria-label="oc-auto" />
  <img slot="img" src="https://www.otto.de/assets-storybook/assets/img-placeholder-100.DVwSxVZf.png" alt="blue checkered background"><div slot='headline'>Headline</div><div slot='subline'>Subline</div>
</oc-media-object-card-v2>
<h2>Radio button</h2>
<div class="row">
<oc-media-object-card-v2 variant="ambient-image">
  <input type="radio" name="media-object-card-selection-demo" aria-label="oc-auto" />
  <img slot="img" src="https://www.otto.de/assets-storybook/assets/img-placeholder-100.DVwSxVZf.png" alt="blue checkered background"><div slot='headline'>Headline</div><div slot='subline'>Subline</div>
</oc-media-object-card-v2>
<oc-media-object-card-v2 variant="ambient-image">
  <input
    type="radio"
    name="media-object-card-selection-demo"
    aria-label="oc-auto"
    checked
  />
  <img slot="img" src="https://www.otto.de/assets-storybook/assets/img-placeholder-100.DVwSxVZf.png" alt="blue checkered background"><div slot='headline'>Headline</div><div slot='subline'>Subline</div>
</oc-media-object-card-v2>
<oc-media-object-card-v2 variant="ambient-image">
  <input type="radio" name="media-object-card-selection-demo" aria-label="oc-auto" />
  <img slot="img" src="https://www.otto.de/assets-storybook/assets/img-placeholder-100.DVwSxVZf.png" alt="blue checkered background"><div slot='headline'>Headline</div><div slot='subline'>Subline</div>
</oc-media-object-card-v2>
<h2>Switch button</h2>
<div class="row">
<oc-media-object-card-v2 variant="ambient-image">
  <button role="switch" aria-checked="false" aria-label="oc-auto"></button>
  <img slot="img" src="https://www.otto.de/assets-storybook/assets/img-placeholder-100.DVwSxVZf.png" alt="blue checkered background"><div slot='headline'>Headline</div><div slot='subline'>Subline</div>
</oc-media-object-card-v2>
<oc-media-object-card-v2 variant="ambient-image">
  <button role="switch" aria-checked="true" aria-label="oc-auto"></button>
  <img slot="img" src="https://www.otto.de/assets-storybook/assets/img-placeholder-100.DVwSxVZf.png" alt="blue checkered background"><div slot='headline'>Headline</div><div slot='subline'>Subline</div>
</oc-media-object-card-v2>
<oc-media-object-card-v2 variant="ambient-image">
  <button role="switch" aria-checked="false" aria-label="oc-auto"></button>
  <img slot="img" src="https://www.otto.de/assets-storybook/assets/img-placeholder-100.DVwSxVZf.png" alt="blue checkered background"><div slot='headline'>Headline</div><div slot='subline'>Subline</div>
</oc-media-object-card-v2>
<h2>Current-marked link</h2>
<div class="row">
<oc-media-object-card-v2 variant="ambient-image">
  <a href="#" aria-label="oc-auto"></a>
  <img slot="img" src="https://www.otto.de/assets-storybook/assets/img-placeholder-100.DVwSxVZf.png" alt="blue checkered background"><div slot='headline'>Headline</div><div slot='subline'>Subline</div>
</oc-media-object-card-v2>
<oc-media-object-card-v2 variant="ambient-image">
  <a href="#" aria-current="page" aria-label="oc-auto"></a>
  <img slot="img" src="https://www.otto.de/assets-storybook/assets/img-placeholder-100.DVwSxVZf.png" alt="blue checkered background"><div slot='headline'>Headline</div><div slot='subline'>Subline</div>
</oc-media-object-card-v2>
<oc-media-object-card-v2 variant="ambient-image">
  <a href="#" aria-label="oc-auto"></a>
  <img slot="img" src="https://www.otto.de/assets-storybook/assets/img-placeholder-100.DVwSxVZf.png" alt="blue checkered background"><div slot='headline'>Headline</div><div slot='subline'>Subline</div>
</oc-media-object-card-v2>
<style>
.row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.row > oc-media-object-card-v2 {
  width: 200px;
}
h2 {
  margin-top: 16px;
}
</style>
With button behavior

The media object card can also be used with button behavior by placing a button element in the default slot.

blue checkered background
Headline
Subline
HTML
<oc-media-object-card-v2 variant="ambient-image">
<img slot="img" src="https://www.otto.de/assets-storybook/assets/img-placeholder-100.DVwSxVZf.png" alt="blue checkered background">
<div slot='headline'>Headline</div>
<div slot='subline'>Subline</div>
<button aria-label='oc-auto'></button>
</oc-media-object-card-v2>

The media object card component with a link as action. Search engines will detect the href.

blue checkered background
Headline
Subline
HTML
<oc-media-object-card-v2 variant="ambient-image">
<img slot="img" src="https://www.otto.de/assets-storybook/assets/img-placeholder-100.DVwSxVZf.png" alt="blue checkered background">
<div slot='headline' >Headline</div>
<div slot='subline' >Subline</div>
<a href='#' aria-label='oc-auto'></a>
</oc-media-object-card-v2>

The media object card component with a masked link. Search engines will not detect the href.

blue checkered background
Headline
Subline
HTML
<oc-media-object-card-v2 variant="ambient-image">
<img slot="img" src="https://www.otto.de/assets-storybook/assets/img-placeholder-100.DVwSxVZf.png" alt="blue checkered background">
<div slot='headline'>Headline</div>
<div slot='subline'>Subline</div>
<div role="link" tabindex="0" data-masked-ref="Iw==" aria-label='oc-auto'></div>
</oc-media-object-card-v2>

The media object card component with a link with switch behavior. Search engines will detect the href, while users receive the Base64-encoded version.

blue checkered background
Headline
Subline
HTML
<oc-media-object-card-v2 variant="ambient-image">
<img slot="img" src="https://www.otto.de/assets-storybook/assets/img-placeholder-100.DVwSxVZf.png" alt="blue checkered background">
<div slot='headline'>Headline</div>
<div slot='subline'>Subline</div>
<a href='#' data-masked-ref="Iw==" aria-label='oc-auto'></a>
</oc-media-object-card-v2>
Older versions

Migration to v2

Migration from Media Object Card v1 to v2

The oc-media-object-card component has been updated from oc-media-object-card-v1 to oc-media-object-card-v2. This migration guide provides step-by-step instructions to update your project to the latest version.

Skip to:

What's new
Simplified API with native elements

The component now uses native HTML elements (<a>, <button>) in the default slot instead of the primary-action slot, providing:

  • Improved accessibility with native semantics
  • Simpler API with fewer custom attributes
  • Better form integration
Automatic accessibility labeling

The new aria-label="oc-auto" pattern automatically derives accessible names from the headline and subline slots:

<oc-media-object-card-v2 variant="ambient-image">
  <a href="/product" aria-label="oc-auto"></a>
  <img slot="img" src="image.jpg" alt="Product image" />
  <div slot="headline">Premium Widget</div>
  <div slot="subline">$49.99</div>
</oc-media-object-card-v2>
Width behavior attribute

The fit-content boolean attribute has been replaced with the more semantic width-behavior attribute that accepts "fill" (default) or "fit" values:

<oc-media-object-card-v2 width-behavior="fit">
  <!-- content -->
</oc-media-object-card-v2>
Icon color as CSS variable

The icon-color attribute has been converted to a CSS variable for better customization:

<oc-media-object-card-v2 variant="icon" icon="heart" style="--icon-color: #ff0000">
  <!-- content -->
</oc-media-object-card-v2>
Explicit interaction patterns

Instead of using attributes like as-button or base64-href, v2 makes the interaction pattern explicit through the HTML structure:

  • Link: <oc-media-object-card-v2><a href="...">...</a></oc-media-object-card-v2>
  • Button: <oc-media-object-card-v2><button>...</button></oc-media-object-card-v2>
  • Masked link: <oc-media-object-card-v2><div role="link" tabindex="0" data-masked-ref="...">...</div></oc-media-object-card-v2>
  • Link switching: <oc-media-object-card-v2><a href="..." data-masked-ref="...">...</a></oc-media-object-card-v2>

This makes the component's behavior clearer and more maintainable.

API changes
Removed attributes

The following attributes have been removed and their functionality moved to the slotted element or renamed:

v1 Attribute v2 Equivalent Notes
align-headline Use --align-headline CSS variable Moved to CSS variable
align-subline Use --align-subline CSS variable Moved to CSS variable
as-button Use a <button> tag in the default slot Button behavior now explicit via native button
background-color Use --background-color CSS variable Moved to CSS variable
base64-href Use data-masked-ref attribute on <a> element in default slot Moved to slotted element
fit-content width-behavior="fit" Renamed for clarity
icon-color Use --icon-color CSS variable Moved to CSS variable
oc-aria-label Use aria-label on the slotted element (or aria-label="oc-auto") Renamed to standard attribute
rel Set rel attribute on the slotted <a> element Moved to native anchor element
target Set target attribute on the slotted <a> element Moved to native anchor element
Changed slots
v1 Slot v2 Slot Notes
primary-action default Interactive element (<a> or <button>) now goes in the default slot
New slots
Slot Description
default Contains the interactive element (<a>, <button>, or <div> for masked links). Supports oc-auto for accessibility.
Unchanged attributes
Attribute Notes
elevation-level Works the same in v2
icon Works the same in v2
inverted Works the same in v2
prefer-vertical-alignment Works the same in v2
single-line Works the same in v2
size Works the same in v2
variant Works the same in v2
Unchanged slots
Slot Notes
action-signifier Works the same in v2
headline Works the same in v2
img Works the same in v2
subline Works the same in v2
CSS Variables
v1 Property v2 Property Notes
align-headline attribute --align-headline Moved from HTML attribute to CSS variable
align-subline attribute --align-subline Moved from HTML attribute to CSS variable
--background-color --background-color Works the same in v2
--cutout-overlay --cutout-overlay Works the same in v2
--icon-color --icon-color Works the same in v2 (see icon-color attribute removed above)
How to migrate

The main change in v2 is the simplified API that uses the default slot for the interactive element (link or button) instead of managing it through attributes or the primary-action slot.

<!-- From: -->
<oc-media-object-card-v1 variant="ambient-image">
  <a slot="primary-action" href="/product" aria-labelledby="headline1 subline1"></a>
  <img slot="img" src="image.jpg" alt="Product image" />
  <div slot="headline" id="headline1">Headline</div>
  <div slot="subline" id="subline1">Subline</div>
</oc-media-object-card-v1>
<!-- To: -->
<oc-media-object-card-v2 variant="ambient-image">
  <a href="/product" aria-label="oc-auto"></a>
  <img slot="img" src="image.jpg" alt="Product image" />
  <div slot="headline">Headline</div>
  <div slot="subline">Subline</div>
</oc-media-object-card-v2>

Note: The aria-label="oc-auto" attribute enables automatic accessibility labeling from the headline and subline slots.

Migrate a media object card with button behavior
<!-- From: -->
<oc-media-object-card-v1 variant="icon" icon="wishlist" as-button oc-aria-label="Add to wishlist">
  <div slot="headline">Add to wishlist</div>
  <div slot="subline">Save for later</div>
</oc-media-object-card-v1>
<!-- To: -->
<oc-media-object-card-v2 variant="icon" icon="wishlist">
  <button aria-label="oc-auto"></button>
  <div slot="headline">Add to wishlist</div>
  <div slot="subline">Save for later</div>
</oc-media-object-card-v2>
<!-- From: -->
<oc-media-object-card-v1 variant="ambient-image" base64-href="L3Byb2R1Y3Q=" oc-aria-label="View product">
  <img slot="img" src="image.jpg" alt="Product image" />
  <div slot="headline">Headline</div>
  <div slot="subline">Subline</div>
</oc-media-object-card-v1>
<!-- To: -->
<oc-media-object-card-v2 variant="ambient-image">
  <div role="link" tabindex="0" data-masked-ref="L3Byb2R1Y3Q=" aria-label="oc-auto"></div>
  <img slot="img" src="image.jpg" alt="Product image" />
  <div slot="headline">Headline</div>
  <div slot="subline">Subline</div>
</oc-media-object-card-v2>
<!-- From: -->
<oc-media-object-card-v1 variant="ambient-image" base64-href="L3VzZXI=">
  <a slot="primary-action" href="/seo-url" aria-label="View profile"></a>
  <img slot="img" src="image.jpg" alt="Profile picture" />
  <div slot="headline">Headline</div>
  <div slot="subline">Subline</div>
</oc-media-object-card-v1>
<!-- To: -->
<oc-media-object-card-v2 variant="ambient-image">
  <a href="/seo-url" data-masked-ref="L3VzZXI=" aria-label="oc-auto"></a>
  <img slot="img" src="image.jpg" alt="Profile picture" />
  <div slot="headline">Headline</div>
  <div slot="subline">Subline</div>
</oc-media-object-card-v2>
Migrate a text-only variant
<!-- From: -->
<oc-media-object-card-v1 variant="text-only" as-button oc-aria-label="Select option">
  <div slot="headline">Option Title</div>
  <div slot="subline">Option description</div>
</oc-media-object-card-v1>
<!-- To: -->
<oc-media-object-card-v2 variant="text-only">
  <button aria-label="oc-auto"></button>
  <div slot="headline">Option Title</div>
  <div slot="subline">Option description</div>
</oc-media-object-card-v2>
Migrate a card with custom background color
<!-- From: -->
<oc-media-object-card-v1 variant="ambient-image" background-color="#f0f0f0">
  <a slot="primary-action" href="/product" aria-label="View product"></a>
  <img slot="img" src="image.jpg" alt="Product image" />
  <div slot="headline">Product Name</div>
  <div slot="subline">$99.99</div>
</oc-media-object-card-v1>
<!-- To: -->
<oc-media-object-card-v2 variant="ambient-image" style="--background-color: #f0f0f0">
  <a href="/product" aria-label="oc-auto"></a>
  <img slot="img" src="image.jpg" alt="Product image" />
  <div slot="headline">Product Name</div>
  <div slot="subline">$99.99</div>
</oc-media-object-card-v2>
Migrate a card with cut-out image variant
<!-- From: -->
<oc-media-object-card-v1 variant="cut-out-image" style="--cutout-overlay: #f0f0f0">
  <a slot="primary-action" href="/product" aria-label="View product"></a>
  <img slot="img" src="image.jpg" alt="Product image" />
  <div slot="headline">Product Name</div>
  <div slot="subline">$99.99</div>
</oc-media-object-card-v1>
<!-- To: -->
<oc-media-object-card-v2 variant="cut-out-image" style="--cutout-overlay: #f0f0f0">
  <a href="/product" aria-label="oc-auto"></a>
  <img slot="img" src="image.jpg" alt="Product image" />
  <div slot="headline">Product Name</div>
  <div slot="subline">$99.99</div>
</oc-media-object-card-v2>
Migrate alignment attributes (align-headline / align-subline)

In v1, headline and subline alignment were controlled via HTML attributes. In v2, they are CSS custom properties.

<!-- From: -->
<oc-media-object-card-v1 variant="ambient-image" align-headline="center" align-subline="end">
  <div slot="headline">Headline</div>
  <div slot="subline">Subline</div>
</oc-media-object-card-v1>
<!-- To: -->
<oc-media-object-card-v2 variant="ambient-image" style="--align-headline: center; --align-subline: end">
  <div slot="headline">Headline</div>
  <div slot="subline">Subline</div>
</oc-media-object-card-v2>
Migrate width behavior (fit-content)
<!-- From: -->
<oc-media-object-card-v1 variant="icon" icon="info" fit-content>
  <div slot="headline">Info</div>
</oc-media-object-card-v1>
<!-- To: -->
<oc-media-object-card-v2 variant="icon" icon="info" width-behavior="fit">
  <div slot="headline">Info</div>
</oc-media-object-card-v2>
Migrate with action signifier
<!-- From: -->
<oc-media-object-card-v1 variant="ambient-image" as-button oc-aria-label="Card action">
  <img slot="img" src="image.jpg" alt="Product image" />
  <div slot="headline">Headline</div>
  <div slot="subline">Subline</div>
  <oc-action-signifier-v1 slot="action-signifier" variant="text" label="Action"></oc-action-signifier-v1>
</oc-media-object-card-v1>
<!-- To: -->
<oc-media-object-card-v2 variant="ambient-image">
  <button aria-label="oc-auto"></button>
  <img slot="img" src="image.jpg" alt="Product image" />
  <div slot="headline">Headline</div>
  <div slot="subline">Subline</div>
  <oc-action-signifier-v1 slot="action-signifier" variant="text" label="Action"></oc-action-signifier-v1>
</oc-media-object-card-v2>
Migrate with custom icon color
<!-- From: -->
<oc-media-object-card-v1 variant="icon" icon="heart" icon-color="#ff0000">
  <div slot="headline">Favorites</div>
</oc-media-object-card-v1>
<!-- To: -->
<oc-media-object-card-v2 variant="icon" icon="heart" style="--icon-color: #ff0000">
  <div slot="headline">Favorites</div>
</oc-media-object-card-v2>

API v1

API: <oc-media-object-card-v1> (MediaObjectCardV1)

The media object card component is a versatile UI element that combines media (like images or icons) with textual content (headline and subline) to create an engaging and informative card layout. It can be used in various contexts, such as displaying product information, user profiles, or any content that benefits from a visual representation alongside text.

Attributes / properties
Attribute Type Default Required Description
variant "icon" | "ambient-image" | "cut-out-image" | "text-only" "ambient-image" no The variant of the media object card
size "50" | "100" | "25" | "75" "100" no Sets the size of the media object card
icon icon name undefined no Sets the icon of the media object card.
inverted boolean undefined no Sets the media-object-card styles to be inverted.
fit-content boolean false no Determines if the element should be as wide as the content. Only works if there is no custom width set. Set to true to make the media object card fit the content width.
prefer-vertical-alignment boolean undefined no Prefers vertical alignment of text whenever possible.
single-line boolean undefined no Whether the content should be shown in a single line
align-headline
11 values"stretch" | "auto" | "normal" | "baseline" | "center" | "end" | "start" | "self-start" | "self-end" | "flex-start" | "flex-end"
"baseline" no Sets the alignment of the headline.

Note: The alignment of the headline is only applied when slots are aligned horizontally.
align-subline
11 values"stretch" | "auto" | "normal" | "baseline" | "center" | "end" | "start" | "self-start" | "self-end" | "flex-start" | "flex-end"
"baseline" no Sets the alignment of the subline.

Note: The alignment of the headline is only applied when slots are aligned horizontally.
elevation-level "canvas" | "stacked" | "above" | "sticky" "canvas" no Sets the elevation level of the card. The elevation level determines the shadow and depth of the card. - canvas: no shadow, media-object-card appears flat, to be used on frame.

Note: Has no effect, when background-color or inverted has been set. - stacked: shadow, media-object-card appears stacked, to be used on canvas.

Note: Has no effect, when background-color or inverted has been set. - above: shadow, media-object-card appears above other levels. - sticky: shadow, media-object-card appears above all other levels and is sticky.
background-color string undefined no Sets a custom background color.
icon-color string undefined no Custom icon color
base64-href string undefined no Sets the base64-encoded link target of the media object card. Use this attribute to prevent search engines from indexing the link target.
target "_blank" | "_self" | "_parent" | "_top" undefined no Sets the target attribute of the media object card.

Note Only applies when base64Href is set.
rel string undefined no Sets the rel attribute of the media object card.

Note Only applies when base64Href is set.
as-button boolean false no Determines if the media object card behaves as a button or as a link when clicked. Set to true to make the media object card behave as a button and trigger an action instead of navigating to a new page.
oc-aria-label string undefined no Sets the ARIA label of the media object card.
Slots
Slot Required Description
headline no Sets the main headline.
subline no Sets the subline of the media object card. Use this slot to display additional information or context about the media object card.
img no Sets an image.
action-signifier no Action signifier slot

For more information, see the action signifier documentation.
primary-action no Add an empty tag to change the default behavior of the card component.

- empty a tag: the card component behaves as a link (SEO relevant) - empty button tag: the card component behaves as a button - empty div tag: for link masking when there are multiple interactive elements
Events
Event Detail type Description
oc-property-change OcMediaObjectCardV1Events["oc-property-change"] Whenever a property value changes, this event triggers. Use this event to track all property changes within the component.

Refer to the Events documentation for more information.
oc-mount { component: string; } Fired when the component is mounted to the DOM. The event is fired when the onMount hook of the component is called by the runtime.
oc-unmount { component: string; } Fired when the component is unmounted from the DOM. The event is fired when the function returned by the onMount hook of the component is called by the runtime.
CSS custom properties
Custom property Default Description
--background-color undefined Sets a custom background color through a CSS variable. Note: The preferred way of using colors is via design tokens instead of hex values.
--cutout-overlay undefined Sets the background color of the cutout area Note: Only applies when variant is set to "cut-out-image"
--icon-color undefined Sets a custom icon color through a CSS variable. Note: The preferred way of using colors is via design tokens instead of hex values.