Skip to main content Home About the Design SystemRoadmap OverviewDesignersDevelopers OverviewColorGridIconographyInteractionsSpacingTypography Overview Global colorBox shadowTypographyBorderOpacitySpaceLengthIconBreakpointsMedia queries All elements Accordion Alert Announcement Audio player Avatar Back to top Badge Blockquote Breadcrumb Button Card Chip Code block Call to action Dialog Disclosure Footer Health index Icon Jump links Menu dropdown Navigation link Navigation (primary) Navigation (secondary) Navigation (vertical) Pagination PopoverPlanned Progress stepper Scheme toggle Site status Skeleton Skip link Spinner Statistic Subnavigation Surface Switch Table Tabs Tag Tile Timestamp Tooltip Video embed OverviewColor PalettesCustomizingDevelopers All PatternsAccordionCall to ActionCardFilterFormLink with iconLogo wallSearch barSticky bannerSticky cardTabsTagTile All Personalization PatternsAnnouncement FundamentalsAccessibility toolsAssistive technologiesCI/CDContentContributorsDesignDevelopmentManual testingResourcesScreen readers Design/code status Release notes Get support

Video embed

OverviewStyleGuidelinesCodeAccessibilityDemos
Video embedAlignmentCard With VideoColor ContextNo CaptionRequire ConsentVideo embedAlignmentCard With VideoColor ContextNo CaptionRequire Consent

Video embed

import '@rhds/elements/rh-video-embed/rh-video-embed.js';
<rh-video-embed>
  <img slot="thumbnail" src="video-thumb.jpg" alt="Image description">
  <template>
    <iframe title="Title of video" width="900" height="499" src="https://www.youtube.com/embed/Hc8emNr2igU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe>
  </template>
  <p slot="caption"><a class="rh-video-embed-caption-link" href="https://www.redhat.com/">View the infographic</a></p>
</rh-video-embed>

Alignment

import '@rhds/elements/rh-video-embed/rh-video-embed.js';
.wrap:not(:first-of-type) {
  border-block-start: var(--rh-border-width-sm, 1px) solid var(--rh-color-border-subtle-on-light, #c7c7c7);
  margin-block-start: var(--rh-space-2xl, 32px);
  padding-block-start: var(--rh-space-2xl, 32px);
}

.centered {
  justify-content: center;
  text-align: center;
}

.right-aligned {
  justify-content: end;
  text-align: end;
}
<div class="wrap">
  <rh-video-embed class="centered">
    <img slot="thumbnail" src="../video-thumb.jpg" alt="Image description">
    <template>
      <iframe title="Title of video" width="900" height="499" src="https://www.youtube.com/embed/Hc8emNr2igU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe>
    </template>
    <p slot="caption"><a class="rh-video-embed-caption-link" href="https://www.redhat.com/">View the infographic</a></p>
  </rh-video-embed>
</div>

<div class="wrap">
  <rh-video-embed class="right-aligned">
    <img slot="thumbnail" src="../video-thumb.jpg" alt="Image description">
    <template>
      <iframe title="Title of video" width="900" height="499" src="https://www.youtube.com/embed/Hc8emNr2igU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe>
    </template>
    <p slot="caption"><a class="rh-video-embed-caption-link" href="https://www.redhat.com/">View the infographic</a></p>
  </rh-video-embed>
</div>

Card With Video

import '@rhds/elements/rh-video-embed/rh-video-embed.js';
import '@rhds/elements/rh-cta/rh-cta.js';
import '@rhds/elements/rh-card/rh-card.js';
main {
  display: block;
}

.wrapper {
  max-width: 900px;
  display: block;
}

rh-card::part(header) {
  margin: 0;
}
<div class="wrapper">
  <rh-card>
    <rh-video-embed slot="header">
      <img slot="thumbnail" src="../video-thumb.jpg" alt="Image description">
      <template>
        <iframe title="Title of video" width="900" height="499" src="https://www.youtube.com/embed/Hc8emNr2igU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe>
      </template>
    </rh-video-embed>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
      Nullam eleifend elit sed est egestas, a sollicitudin mauris
      tincidunt. Pellentesque vel dapibus risus. Nullam aliquam
      felis orci, eget cursus mi lacinia quis. Vivamus at felis sem.</p>
    <rh-cta variant="secondary" slot="footer">
      <a href="#">Call to action</a>
    </rh-cta>
  </rh-card>
</div>

Color Context

import '@rhds/elements/lib/elements/rh-context-demo/rh-context-demo.js';
import '@rhds/elements/rh-video-embed/rh-video-embed.js';
<rh-context-demo>
  <rh-video-embed>
    <img slot="thumbnail" src="../video-thumb.jpg" alt="Image description">
    <template>
      <iframe title="Title of video" width="900" height="499" src="https://www.youtube.com/embed/Hc8emNr2igU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe>
    </template>
    <p slot="caption">Video caption here</p>
  </rh-video-embed>
</rh-context-demo>

No Caption

import '@rhds/elements/rh-video-embed/rh-video-embed.js';
<rh-video-embed>
  <img slot="thumbnail" src="../video-thumb.jpg" alt="Image description">
  <template>
    <iframe title="Title of video" width="900" height="499" src="https://www.youtube.com/embed/Hc8emNr2igU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe>
  </template>
</rh-video-embed>
import '@rhds/elements/rh-video-embed/rh-video-embed.js';

const video = document.getElementById('video');
video.addEventListener('consent-click', consentWindow);


function consentWindow() {
  // replace with custom consent logic
  if (confirm('Allow cookies?')) {
    // enables video after consent
    video.consented = true;
  }
}
<rh-video-embed id="video" require-consent="">
  <img slot="thumbnail" src="../video-thumb.jpg" alt="Image description">
  <template>
    <iframe title="Title of video" width="900" height="499" src="https://www.youtube.com/embed/Hc8emNr2igU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe>
  </template>
  <p slot="caption"><a class="rh-video-embed-caption-link" href="https://www.redhat.com/">View the infographic</a></p>
</rh-video-embed>
© 2025 Red Hat Deploys by Netlify