Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Card <wa-card>

Groups media, metadata, and actions into one surface.

“the space where interactions between humans and machines occur” — Wikipedia: User interface. This quote supplies general domain context, not an API definition.

Category: Layout · Availability: Core · Maturity: Stable.

Source: Web Awesome component source (MyST GitHub transformer); official component documentation.

Live preview

Static reference (works without JavaScript)

Coffee cup photograph

The image and copyable HTML example below remain available if the interactive widget fails to initialize. The widget adds component behavior; it does not provide the only readable content.

Markdown code snippet

<wa-card appearance="outlined">
  <img slot="media" src="./images/coffee.png" alt="White cup of coffee on wood" loading="lazy">
  <strong slot="header">Coffee sample</strong>
  <p>A real bundled, CC0 photograph.</p>
  <wa-button slot="footer-actions" appearance="plain" href="/components/showcase-media">Media credits</wa-button>
</wa-card>

<wa-card appearance="outlined">
  <video slot="media" controls preload="metadata" aria-label="Short CC0 video of a flower">
    <source src="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4" type="video/mp4">
  </video>
  <strong slot="header">Motion media</strong>
  <p>A CC0 video with browser-native playback controls.</p>
</wa-card>

Usage and API notes

The photo is bundled locally; the short CC0 video is streamed from MDN and needs a network connection. <wa-card> supports media, headers, and action slots. Prefer the portable MyST {card} directive for ordinary documentation content; choose <wa-card> when Web Awesome slot semantics are needed. No Pro runtime is required for native HTML video.

Media sources: Showcase media.