OTTODesign System

Components

Interactive overlay

The interactive overlay provides a way to make content interactive. This component is useful in cases where you want to give your content states. It is used within several components, e.g. interactive logos, but may also be used standalone for custom interactive elements.

Configurator

LiveInteractive overlay: hover, press and tab to the square to see the states. The overlay radius follows the content radius plus the offset.
HTML
<div style="--r:0px">
  <oc-interactive-overlay-v2 style="--border-offset:2px;--border-radius:var(--r)">
    <a href="#" aria-label="Zum Angebot" style="display:block"><span style="display:block;width:96px;height:96px;border-radius:var(--r);background:var(--oc-semantic-color-background-soft-mint)"></span></a>
  </oc-interactive-overlay-v2>
</div>

Usage

Variants

The border offset is 2px by default, but it can be adjusted depending on size of the content.

Hover, press and tab to the squares to see the overlay

Small content: offset 2px

Large content: offset 8px

Liveborder offset for small and large content
HTML
<p class="demo-label">Hover, press and tab to the squares to see the overlay</p>
<oc-interactive-overlay-v2 style="--border-offset:2px;--border-radius:0px"><a href="#" aria-label="Zum Angebot" style="display:block"><span style="display:block;width:48px;height:48px;border-radius:0px;background:var(--oc-semantic-color-background-soft-mint)"></span></a></oc-interactive-overlay-v2><p class="demo-label" style="text-align:center">Small content: offset 2px</p></div>
<oc-interactive-overlay-v2 style="--border-offset:8px;--border-radius:0px"><a href="#" aria-label="Zum Angebot" style="display:block"><span style="display:block;width:80px;height:80px;border-radius:0px;background:var(--oc-semantic-color-background-soft-mint)"></span></a></oc-interactive-overlay-v2><p class="demo-label" style="text-align:center">Large content: offset 8px</p></div>

Adapt the border radius when there is a border radius used inside the content. Use border-radius design tokens for this, as they use relative values.

The border radius of the interactive overlay automatically adapts using the following formula meeting the general border radius requirements:

border radius of the content + offset
= outer radius of the interactive overlay

Hover, press and tab to the squares to see the overlay

context border radius: 0px
offset: 2px
outer radius: 2px

context border radius: 8px
offset: 2px
outer radius: 10px

context border radius: 16px
offset: 2px
outer radius: 18px

context border radius: 0px
offset: 4px
outer radius: 4px

context border radius: 8px
offset: 0px
outer radius: 8px

context border radius: 16px
offset: 4px
outer radius: 20px

Live0px, 8px and 16px content with interactive overlay
HTML
<p class="demo-label">Hover, press and tab to the squares to see the overlay</p>
<oc-interactive-overlay-v2 style="--border-offset:2px;--border-radius:0px"><a href="#" aria-label="Zum Angebot" style="display:block"><span style="display:block;width:48px;height:48px;border-radius:0px;background:var(--oc-semantic-color-background-soft-mint)"></span></a></oc-interactive-overlay-v2><p class="demo-label" style="text-align:center">context border radius: 0px<br>offset: 2px<br>outer radius: 2px</p></div>
<oc-interactive-overlay-v2 style="--border-offset:2px;--border-radius:8px"><a href="#" aria-label="Zum Angebot" style="display:block"><span style="display:block;width:48px;height:48px;border-radius:8px;background:var(--oc-semantic-color-background-soft-mint)"></span></a></oc-interactive-overlay-v2><p class="demo-label" style="text-align:center">context border radius: 8px<br>offset: 2px<br>outer radius: 10px</p></div>
<oc-interactive-overlay-v2 style="--border-offset:2px;--border-radius:16px"><a href="#" aria-label="Zum Angebot" style="display:block"><span style="display:block;width:48px;height:48px;border-radius:16px;background:var(--oc-semantic-color-background-soft-mint)"></span></a></oc-interactive-overlay-v2><p class="demo-label" style="text-align:center">context border radius: 16px<br>offset: 2px<br>outer radius: 18px</p></div>
<oc-interactive-overlay-v2 style="--border-offset:4px;--border-radius:0px"><a href="#" aria-label="Zum Angebot" style="display:block"><span style="display:block;width:48px;height:48px;border-radius:0px;background:var(--oc-semantic-color-background-soft-mint)"></span></a></oc-interactive-overlay-v2><p class="demo-label" style="text-align:center">context border radius: 0px<br>offset: 4px<br>outer radius: 4px</p></div>
<oc-interactive-overlay-v2 style="--border-offset:0px;--border-radius:8px"><a href="#" aria-label="Zum Angebot" style="display:block"><span style="display:block;width:48px;height:48px;border-radius:8px;background:var(--oc-semantic-color-background-soft-mint)"></span></a></oc-interactive-overlay-v2><p class="demo-label" style="text-align:center">context border radius: 8px<br>offset: 0px<br>outer radius: 8px</p></div>
<oc-interactive-overlay-v2 style="--border-offset:4px;--border-radius:16px"><a href="#" aria-label="Zum Angebot" style="display:block"><span style="display:block;width:48px;height:48px;border-radius:16px;background:var(--oc-semantic-color-background-soft-mint)"></span></a></oc-interactive-overlay-v2><p class="demo-label" style="text-align:center">context border radius: 16px<br>offset: 4px<br>outer radius: 20px</p></div>

Behavior

States

Enabled: hover it, press it and tab to it for the focus ring

LiveStates
HTML
<p class="demo-label">Enabled: hover it, press it and tab to it for the focus ring</p>
<oc-interactive-overlay-v2 style="--border-offset:8px;--border-radius:0px"><a href="#" aria-label="Zum Angebot" style="display:block"><span style="display:block;width:128px;height:128px;border-radius:0px;background:var(--oc-semantic-color-background-soft-mint)"></span></a></oc-interactive-overlay-v2></div>

Fitting

The interactive overlay uses fit-content for the width and height. The border offset is set inside the component and added automatically. It does not effect the actual height or width of the interactive overlay.

fit-content in width and height; the border offset is added outside and does not change the size

Livefitting
HTML
<span style="outline:1px dashed #e5006b"><oc-interactive-overlay-v2><a href="#" aria-label="Zum Angebot" style="display:block"><span style="display:block;width:48px;height:48px;background:var(--oc-semantic-color-background-soft-mint)"></span></a></oc-interactive-overlay-v2></span>

Best practices

DoUse the interactive overlay to add states to interactive elements that do not have their own states, for example header icons.
-20 % In den Warenkorb
Don'tUse the interactive overlay for static elements or elements that already have states.

Accessibility

For information on accessibility, refer to the technical documentation.

Status

Implementation

Live demo

Hover, press and tab through the logo and the header icons

Weißer Sneaker auf rotem Grund

Sneaker-Woche

Bis zu 30 % auf ausgewählte Modelle

Zu den Sneakern
LiveReal OTTO components, rendered by the OTTO component runtime
HTML
<div class="on-frame" style="margin:0;padding:24px">
<div style="display:grid;gap:16px;max-width:880px;margin:0 auto">
<div style="background:#fff;border-radius:16px;padding:12px 16px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:16px;align-items:center">
  <oc-interactive-overlay-v2 style="--border-radius:4px;--border-offset:4px"><a href="#" aria-label="OTTO Startseite" style="display:block;width:88px"><img src="/references/logos/otto/otto-de-press-Otto_Logo_rgb.png" alt="" style="display:block;margin:0;width:100%"></a></oc-interactive-overlay-v2>
  <oc-search-field-v1><input type="search" placeholder="Wonach suchst du?" spellcheck="false"></oc-search-field-v1>
  <oc-interactive-overlay-v2 style="--border-radius:8px;--border-offset:4px"><a href="#" class="oc-text-color-secondary oc-copy-50" aria-label="Mein Konto" style="display:grid;justify-items:center;padding:0 4px;text-decoration:none"><oc-icon-v1 size="100" type="person" style="grid-area:1/1"></oc-icon-v1><oc-badge-v2 variant="success" icon="check" style="grid-area:1/1;margin:8px 0 0 16px"></oc-badge-v2><span>Mein Konto</span></a></oc-interactive-overlay-v2>
  <oc-interactive-overlay-v2 style="--border-radius:8px;--border-offset:4px"><a href="#" class="oc-text-color-secondary oc-copy-50" aria-label="Merkzettel" style="display:grid;justify-items:center;padding:0 4px;text-decoration:none"><oc-icon-v1 size="100" type="wishlist" style="grid-area:1/1"></oc-icon-v1><oc-badge-v2 variant="secondary" style="grid-area:1/1;margin:8px 0 0 16px">3</oc-badge-v2><span>Merkzettel</span></a></oc-interactive-overlay-v2>
  <oc-interactive-overlay-v2 style="--border-radius:8px;--border-offset:4px"><a href="#" class="oc-text-color-secondary oc-copy-50" aria-label="Warenkorb" style="display:grid;justify-items:center;padding:0 4px;text-decoration:none"><oc-icon-v1 size="100" type="basket" style="grid-area:1/1"></oc-icon-v1><oc-badge-v2 variant="primary" style="grid-area:1/1;margin:8px 0 0 16px">1</oc-badge-v2><span>Warenkorb</span></a></oc-interactive-overlay-v2>
<div style="position:relative;border-radius:16px;overflow:hidden"><img src="/previews/imagery/samples/otto-colour-field/colour-field-sneaker.webp" alt="Weißer Sneaker auf rotem Grund" style="display:block;margin:0;width:100%;aspect-ratio:3/1;object-fit:cover"><div style="position:absolute;left:32px;top:50%;transform:translateY(-50%);display:grid;gap:12px;color:#fff"><p class="oc-headline-300">Sneaker-Woche</p><p class="oc-copy-100">Bis zu 30 % auf ausgewählte Modelle</p><div><oc-button-v1 variant="secondary-over-color" fit-content>Zu den Sneakern</oc-button-v1></div></div></div>

Code

Version Tag Status API
v2 <oc-interactive-overlay-v2> Stable, allowed for generation InteractiveOverlayV2
v1 <oc-interactive-overlay-v1> Deprecated, NOT allowed for generation InteractiveOverlayV1

Only the latest version (v2) is allowed for generation. Older versions are kept for reference and are deprecated.

Overview (v2)

Interactive overlay

The interactive overlay component provides a way to make your content interactive. This component is useful in cases where you want to give your content a hover effect, an active state, or a link ability.

Default variation
Per default, I am not interactive.
HTML
<oc-interactive-overlay-v2>Per default, I am not interactive.</oc-interactive-overlay-v2>
Configuration

The interactive overlay component is configurable, allowing you to tailor its features and appearance to your specific needs. To explore all the available options and adjust the component, use the component configurator and see the changes affect the component in real-time.

Usage guidelines

Before integrating the interactive overlay component into your project, make sure you have correctly installed the OTTO components package. Look through the variations page for examples of possible component variations.

Info

See the Interactive overlay UX documentation for detailed user experience guidelines.

Layout considerations

This component has potential visual overflow. When the border-offset property is used, the component extends beyond its bounding box and is clipped by parent containers with overflow: hidden. Ensure the parent container has sufficient padding to accommodate the component's full visual area.

Accessibility

The interactive overlay component relies on the slotted interactive element, so pass aria attributes directly if needed. Reference the built-in accessibility features guide for focus management and keyboard interactions.

Configuration (v2)

Interactive overlay V2 configuration

Configure the interactive overlay component with the controls below and see the changes live in the preview canvas. Click the Show code button within the preview canvas to see the source code for the current component configuration.

Per default, I am not interactive.
HTML
<oc-interactive-overlay-v2>Per default, I am not interactive.</oc-interactive-overlay-v2>

Interactive configurator (Storybook controls); every option is listed in the API section of this file.

Migration (v2)

Migration from Interactive Overlay v1 to v2

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

Skip to:

What's new
Native interactive elements in the slot

In v2, the component no longer manages the interactive behavior (button/link) itself. Instead, you place a native interactive element (<button>, <a>, <a data-masked-ref> for masked links) directly in the default slot. This provides:

  • Better accessibility with native semantics
  • Full control over the interactive element's attributes (aria-label, rel, target, etc.)
  • Native event support on the interactive element itself
API changes
Removed attributes

The following attributes have been removed and their functionality is now handled differently:

v1 Attribute v2 Equivalent Notes
base64-href data-masked-ref on the slotted element Moved from component attribute to slotted element
border-offset --border-offset CSS custom property Moved from HTML attribute to CSS custom property
border-radius --border-radius CSS custom property Moved from HTML attribute to CSS custom property
oc-aria-label aria-label on the slotted element Use aria-label directly on the child element
rel rel on the slotted <a> element Moved from component attribute to slotted <a> element
target target on the slotted <a> element Moved from component attribute to slotted <a> element
Unchanged CSS custom properties
CSS Custom Property Notes
--border-radius No change
--border-offset No change
How to migrate
Migrate a basic interactive overlay

For a basic interactive overlay that acts as a button, the main change is the tag name and moving the interactive element into the default slot as a native element.

<!-- From: -->
<oc-interactive-overlay-v1>Content</oc-interactive-overlay-v1>
<!-- To: -->
<oc-interactive-overlay-v2>
  <button>Content</button>
</oc-interactive-overlay-v2>
<!-- From: -->
<oc-interactive-overlay-v1>
  <a href="#">Content</a>
</oc-interactive-overlay-v1>
<!-- To: -->
<oc-interactive-overlay-v2>
  <a href="#">Content</a>
</oc-interactive-overlay-v2>

Note: Only the tag name changes here — the slotted <a> element stays exactly the same.

In v1, a masked link was created using the base64-href attribute. In v2, the masking is done via a data-masked-ref attribute on the interactive element inside the default slot.

<!-- From: -->
<oc-interactive-overlay-v1 base64-href="Iw==">Content</oc-interactive-overlay-v1>
<!-- To: -->
<oc-interactive-overlay-v2>
  <div data-masked-ref="Iw==" role="link" tabindex="0">Content</div>
</oc-interactive-overlay-v2>

In v1, link switching was achieved using base64-href together with an <a> tag in the slot. In v2, the data-masked-ref attribute is placed directly on the <a> element.

<!-- From: -->
<oc-interactive-overlay-v1 base64-href="Iw==">
  <a href="#">Content</a>
</oc-interactive-overlay-v1>
<!-- To: -->
<oc-interactive-overlay-v2>
  <a href="#" data-masked-ref="Iw==">Content</a>
</oc-interactive-overlay-v2>
Migrate an interactive overlay with a custom border radius
<!-- From: -->
<oc-interactive-overlay-v1 border-radius="8px" border-offset="4px">
  Content
</oc-interactive-overlay-v1>
<!-- To: -->
<oc-interactive-overlay-v2 class="custom-border"> Content </oc-interactive-overlay-v2>
<style>
  .custom-border {
    --border-radius: 8px;
    --border-offset: 4px;
  }
</style>

API v1 (v1, deprecated, not for generation)

Interactive Overlay v1 API

API: <oc-interactive-overlay-v1> (InteractiveOverlayV1)

The interactive overlay component is a wrapper for an interactive element.

Attributes / properties
Attribute Type Default Required Description
border-radius string undefined no Sets a custom border radius for the interactive overlay component.
border-offset string undefined no Sets a custom border offset for the interactive overlay component.
base64-href string undefined no Sets the base64 encoded link target of the interactive overlay component. 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 interactive overlay component.

Note Only applies when base64Href is set.
rel string undefined no Sets the rel attribute of the interactive overlay component.

Note Only applies when base64Href is set.
oc-aria-label string undefined no Sets the ARIA label of the interactive overlay component.

Note Only applies when base64Href is set.
Slots
Slot Required Description
default yes Sets the content of the interactive overlay component. Add an a tag to make the interactive overlay component a link.
Events
Event Detail type Description
oc-property-change OcInteractiveOverlayV1Events["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
--border-radius undefined Sets a custom border radius
--border-offset undefined Sets a custom border offset

API v2

Interactive Overlay v2 API

API: <oc-interactive-overlay-v2> (InteractiveOverlayV2)

The interactive overlay component is a wrapper for an interactive element.

Slots
Slot Required Description
default yes Accepts one of the following elements: - <a href="#"> for a link - <div data-masked-ref="Iw==" role="link" tabindex="0"> for a masked link - <a href="#" data-masked-ref="Iw=="> for link switching

If a non-interactive element is used, the interactive overlay will not have any styles or behaviors applied to it.

For more information on interactive components, refer to the interactive component slots documentation.
Events
Event Detail type Description
oc-property-change OcInteractiveOverlayV2Events["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
--border-radius undefined Sets a custom border radius for the interactive overlay component.
--border-offset undefined Sets a custom border offset for the interactive overlay component.

Variations (v2)

Variations

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

You can explore all available options using the component configurator, adjust the component to your needs, and see the changes live in a preview canvas.

Default

Story: components-interactive-overlay-variations--default · tags: components, interactive-overlay, 2, variations

The default configuration.

Args: defaultSlot=Per default, I am not interactive.

Per default, I am not interactive.
HTML
<oc-interactive-overlay-v2>Per default, I am not interactive.</oc-interactive-overlay-v2>
With button behavior

Story: components-interactive-overlay-variations--with-button-behavior · tags: components, interactive-overlay, 2, variations

The interactive overlay component as a button. Add a click event to see it in action.

Args: defaultSlot=<button>I act as a button. Add a click event to see me in action.</button>

HTML
<oc-interactive-overlay-v2>
<button>I act as a button. Add a click event to see me in action.</button>
</oc-interactive-overlay-v2>

Story: components-interactive-overlay-variations--with-link-behavior · tags: components, interactive-overlay, 2, variations

The interactive overlay component as a link. Search engines will detect the href.

Args: defaultSlot=<a href='#'>I act as a link. Search engines will see me as a link.</a>

HTML
<oc-interactive-overlay-v2><a href='#'>I act as a link. Search engines will see me as a link.</a></oc-interactive-overlay-v2>

Story: components-interactive-overlay-variations--with-masked-link-behavior · tags: components, interactive-overlay, 2, variations

The interactive overlay component as a masked link. Search engines will not detect the href.

Args: defaultSlot=(see snippet)

I act as a masked link. Search engines will not see me as a link.
HTML
<oc-interactive-overlay-v2>
<div data-masked-ref='Iw==' role='link' tabindex='0'>I act as a masked link. Search engines will not see me as a link.</div>
</oc-interactive-overlay-v2>

Story: components-interactive-overlay-variations--with-link-switch-behavior · tags: components, interactive-overlay, 2, variations

The interactive overlay component as a link with switch behavior. Search engines will detect the href, while users receive the Base64-encoded version.

Args: defaultSlot=<a href='#' data-masked-ref='Iw=='>I act as a link. Search engines will get another link than users.</a>

HTML
<oc-interactive-overlay-v2>
<a href='#' data-masked-ref='Iw=='>I act as a link. Search engines will get another link than users.</a>
</oc-interactive-overlay-v2>
Demo: Header Icon

Story: components-interactive-overlay-variations--demo-header-icon · tags: components, interactive-overlay, 2, variations

A demo of how to use the interactive overlay component to create a header icon with a badge.

9
Warenkorb
HTML
<oc-interactive-overlay-v2>
<a
  href="/basket"
  class="my-header-icon oc-text-color-secondary oc-copy-50"
  aria-label="Warenkorb mit 9 Artikeln"
>
  <oc-icon-v1 size="100" type="basket"></oc-icon-v1>
  <oc-badge-v2 size="100" variant="primary">9</oc-badge-v2>
  <div>Warenkorb</div>
</a>
</oc-interactive-overlay-v2>
<style>
.my-header-icon {
  display: grid;
  justify-items: center;
}
.my-header-icon > oc-icon-v1 {
  position: relative;
  grid-area: 1 / 1;
}
.my-header-icon > oc-badge-v2 {
  position: relative;
  grid-area: 1 / 1;
  margin-top: 8px;
  margin-left: 16px;
}
.my-header-icon > div {
  max-width: 100%;
  text-wrap: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
</style>
Story source (TypeScript, verbatim from Storybook)
{
  name: "Demo: Header Icon",
  parameters: {
    controls: {
      disabled: true
    }
  },
  render() {
    return html`
      <oc-interactive-overlay-v2>
        <a
          href="/basket"
          class="my-header-icon oc-text-color-secondary oc-copy-50"
          aria-label="Warenkorb mit 9 Artikeln"
        >
          <oc-icon-v1 size="100" type="basket"></oc-icon-v1>
          <oc-badge-v2 size="100" variant="primary">9</oc-badge-v2>
          <div>Warenkorb</div>
        </a>
      </oc-interactive-overlay-v2>

      <style>
        .my-header-icon {
          display: grid;
          justify-items: center;
        }

        .my-header-icon > oc-icon-v1 {
          position: relative;
          grid-area: 1 / 1;
        }

        .my-header-icon > oc-badge-v2 {
          position: relative;
          grid-area: 1 / 1;
          margin-top: 8px;
          margin-left: 16px;
        }

        .my-header-icon > div {
          max-width: 100%;
          text-wrap: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
      </style>
    `;
  }
}

Interaction tests (InteractiveOverlayV2.interactions.stories.ts)

Interaction test stories (automated tests, not usage patterns).

Should Have Pointer Events Set

Story: components-interactive-overlay-interaction-tests--should-have-pointer-events-set · tags:

HTML
<oc-interactive-overlay-v2></oc-interactive-overlay-v2>

Should Have No Pointer Events Set

Story: components-interactive-overlay-interaction-tests--should-have-no-pointer-events-set · tags:

HTML
<oc-interactive-overlay-v2></oc-interactive-overlay-v2>

V1 (v1, deprecated, not for generation)

Interactive overlay v1

The interactive overlay component provides a way to make your content interactive. This component is useful in cases where you want to give your content a hover effect, an active state, or a link ability.

Default variation
<oc-interactive-overlay-v1>I act as a button. Add a click event to see me in action.</oc-interactive-overlay-v1>
Configuration

The interactive overlay component is configurable, allowing you to tailor its features and appearance to your specific needs. To explore all the available options and adjust the component, use the component configurator and see the changes affect the component in real-time.

Usage guidelines

Before integrating the interactive overlay component into your project, make sure you have correctly installed the OTTO components package.

Look through the variations page for examples of possible component variations.

Layout considerations

This component has potential visual overflow. When the border-offset property is used, the component extends beyond its bounding box and is clipped by parent containers with overflow: hidden. Ensure the parent container has sufficient padding to accommodate the component's full visual area.

Accessibility

The interactive overlay component comes with a set of built-in accessibility features to ensure a seamless experience for all users.

Use oc-aria-label

To make the interactive overlay recognizable for screen readers, use the oc-aria-label attribute to provide clear and descriptive context information. See the general accessibility documentation for guidance on using oc-aria-label, including how it works with link and masked link behavior.

See Link behavior and masked links in the general accessibility documentation for how oc-aria-label is applied in these scenarios.

V1/Configuration (v1, deprecated, not for generation)

Interactive overlay configuration

Configure the interactive overlay component with the controls below and see the changes live in the preview canvas. Click the Show code button within the preview canvas to see the source code for the current component configuration.

<oc-interactive-overlay-v1>I act as a button. Add a click event to see me in action.</oc-interactive-overlay-v1>

Interactive configurator (Storybook controls); every option is listed in the API section of this file.

V1/Variations (v1, deprecated, not for generation)

Variations

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

You can explore all available options using the component configurator, adjust the component to your needs, and see the changes live in a preview canvas.

Default

Story: components-interactive-overlay-v1-variations--default · tags: components, interactive-overlay, 1, variations

The default configuration.

Args: defaultSlot=I act as a button. Add a click event to see me in action.

<oc-interactive-overlay-v1>I act as a button. Add a click event to see me in action.</oc-interactive-overlay-v1>

Story: components-interactive-overlay-v1-variations--with-link-behavior · tags: components, interactive-overlay, 1, variations

The interactive overlay component as a link. Search engines will detect the href.

Args: defaultSlot=(see snippet)

<oc-interactive-overlay-v1>
  <!--The <a> tag should be placed inside the light DOM to improve SEO.--><a href='#'>I act as a link. Search engines will see me as a link.</a>
</oc-interactive-overlay-v1>

Story: components-interactive-overlay-v1-variations--with-masked-link-behavior · tags: components, interactive-overlay, 1, variations

The interactive overlay component as a masked link. Search engines will not detect the href.

Args: defaultSlot=I act as a masked link. Search engines will not see me as a link., base64-href=Iw==

<oc-interactive-overlay-v1 base64-href="Iw==">
  I act as a masked link. Search engines will not see me as a link.
</oc-interactive-overlay-v1>

Story: components-interactive-overlay-v1-variations--with-link-switch-behavior · tags: components, interactive-overlay, 1, variations

The interactive overlay component as a link with switch behavior. Search engines will detect the href, while users receive the Base64-encoded version.

Args: base64-href=Iz92YXJpYW50PWZvbw==, defaultSlot=(see snippet)

<oc-interactive-overlay-v1 base64-href="Iz92YXJpYW50PWZvbw==">
  <!--Search engines will detect the href, while users receive the Base64-encoded version.--><a href='#'>I act as a link. Search engines will get another link than users.</a>
</oc-interactive-overlay-v1>
Demo: border radius content

Story: components-interactive-overlay-v1-variations--demo-border-radius-content · tags: components, interactive-overlay, 1, variations

The interactive overlay component taking border radius and offset from the child.

Args: defaultSlot=(see snippet)

<oc-interactive-overlay-v1>
  <div class='oc-p-50' style='border-radius: 16px; outline-offset: 4px; background: lightyellow'>Content with 16px border radius and 4px outline-offset</div>
</oc-interactive-overlay-v1>