MediaCard
A now-playing media card: artwork, title, scrub bar and transport controls.
Signature
Density
Viewport
Theme and light/dark are set in the top barWhen to use
A now-playing media card: artwork, title, scrub bar and transport controls.
Accessibility
When the whole card is actionable, expose a single accessible name and make it reachable with Tab + Enter. Decorative imagery uses empty alt.
Install and import
npx shadcn@latest add @prism/media-card
import { MediaCard } from '@/components/prism/MediaCard';
In a no-build prototype, read it from the bundle instead: const { MediaCard } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
artwork | string | — | Album / cover art URL; a music-note placeholder shows when absent. |
eyebrow | React.ReactNode | — | Small label above the title. Default "Now playing". |
title | React.ReactNode | — | |
subtitle | React.ReactNode | — | |
progress | number | — | Playback progress 0–100. |
elapsed | React.ReactNode | — | |
total | React.ReactNode | — | |
controls | React.ReactNode | — | Transport control nodes (IconButtons). |
className | string | — |