# Media showcase

Present consumer-owned images, native video or audio, and supplied media slots with captions, transcripts, and accessible selection.

Access: pro. Category: Blocks. Kind: composite.

## When to use

- Use it when a page needs present consumer-owned images, native video or audio, and supplied media slots with captions, transcripts, and accessible selection.
- Choose it inside an authenticated product surface when the host application owns routing, persistence, and service calls.

## Alternatives

- Choose empty-state instead when empty collections, search results and errors with a clear next action is the actual interface need, rather than media showcase.

## Setup for agents

Use React 19 and TypeScript. Initialize shadcn for your framework, then merge this exact entry into components.json:

```json
{
  "registries": {
    "@tidal-pro": {
      "url": "https://tidalui.com/r/pro/{name}.json",
      "headers": {
        "Authorization": "Bearer ${TIDALUI_TOKEN}"
      }
    }
  }
}
```

The namespace must be named **@tidal-pro** because transitive Pro dependencies use that namespace. Obtain an agent key from your active Pro account at https://tidalui.com/account. Keep TIDALUI_TOKEN in your local environment, never in components.json, client code, Git or logs.

```sh
export TIDALUI_TOKEN='your-private-agent-key'
npx shadcn@latest add @tidal-pro/waitlist-form
npx shadcn@latest add https://tidalui.com/r/tidal-button.json
```

Free command: `npx shadcn@latest add https://tidalui.com/r/<name>.json`.
Pro command: `npx shadcn@latest add @tidal-pro/<name>`.

Import the base stylesheet and every stylesheet listed on the installed item's metadata. For example:

```tsx
import "./components/ui/tidal.css";
import "./components/ui/hero-section.css";
// Place installed components inside this wrapper:
<div className="tidal-scope" data-theme="dark">...</div>
```

Omit data-theme for the default light theme. Put the attribute on the same tidal-scope element for dark mode. Every component installs the shared free tidal-base dependency. After upgrading, run `npx shadcn@latest add https://tidalui.com/r/tidal-base.json --overwrite` to receive current tokens. Review local modifications before overwriting.

Vite: Use React + TypeScript. Map @/* to ./src/* in paths and Vite resolve.alias. Import tidal.css and each component stylesheet in your application entry.

Next.js 15 App Router: Next.js App Router: import tidal.css and component CSS in app/layout.tsx. Interactive examples belong in a client component with "use client". Map @/* to ./* or ./src/* to match your project.

TypeScript 6: use paths without baseUrl:

```json
{
  "compilerOptions": {
    "paths": {
      "@/*": [
        "./src/*"
      ]
    }
  }
}
```

Pro registry requests are server/CLI-only. Use the same-origin account interface in a browser; cross-origin Authorization preflights are intentionally unsupported.


## Install Media showcase

```sh
npx shadcn@latest add @tidal-pro/media-showcase
```

Stylesheets: `components/ui/tidal.css`, `components/ui/media-showcase.css`.

## Minimal example

```tsx
import"./components/ui/tidal.css";
import"./components/ui/media-showcase.css";
import{TidalMediaShowcase}from"./components/ui/media-showcase";
export default()=><div className="tidal-scope"><TidalMediaShowcase currentItemId={"example"} items={[{kind:"image",src:"/example.jpg",alt:"value",id:"example",label:"Demo"}]} label={"Demo"} onCurrentItemChange={() => {}}/></div>;
```

## Structured props

- `TidalMediaShowcase.currentItemId: string`: Required current item id value accepted by this exported component.
- `TidalMediaShowcase.items: ReadonlyArray<TidalMediaShowcaseItem>`: Required items value accepted by this exported component.
- `TidalMediaShowcase.label: string`: Required label value accepted by this exported component.
- `TidalMediaShowcase.onCurrentItemChange: (itemId: string, event: TidalMediaShowcaseChangeEvent, source: TidalMediaShowcaseChangeSource) => void`: Callback invoked when the current item change interaction is proposed.
- `TidalMediaShowcase.emptyMessage?: ReactNode`: Optional empty message value accepted by this exported component.
- `TidalMediaShowcase.error?: ReactNode`: Optional error value accepted by this exported component.
- `TidalMediaShowcase.labels?: Partial<TidalMediaShowcaseLabels> | undefined`: Optional labels value accepted by this exported component.
- `TidalMediaShowcase.selectionDisabled?: boolean | undefined` (default false): Optional selection disabled value accepted by this exported component.
- `TidalMediaShowcase.selectionListProps?: Omit<HTMLAttributes<HTMLDivElement>, "role" | "aria-label" | "children" | "dangerouslySetInnerHTML"> | undefined`: Optional selection list props value accepted by this exported component.
- `TidalMediaShowcase.selectionListRef?: Ref<HTMLDivElement> | undefined`: Optional selection list ref value accepted by this exported component.

## Complete usage example

[Source](https://tidalui.com/examples/media-showcase.tsx) | [Manifest](https://tidalui.com/examples/media-showcase.json). Install the listed additional dependencies. Consumer fixture: TypeScript pass; Vite pass. This fixture check is distinct from the actual shadcn install receipt.

```tsx
"use client";

import "./components/ui/tidal.css";

import { useMemo, useState } from "react";

import { TidalMediaShowcase, type TidalMediaShowcaseItem } from "./components/ui/media-showcase";

import "./components/ui/media-showcase.css";

function tidalExampleAvatarDataUri(seed: unknown) {
  const text = String(seed).replace(/[^a-z0-9]/gi, "").slice(-2) || "UI";
  const palette = ["#333333", "#555555", "#777777", "#999999", "#bbbbbb"];
  const color = palette[Array.from(text).reduce((sum, character) => sum + character.charCodeAt(0), 0) % palette.length];
  const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96"><rect width="96" height="96" rx="48" fill="${color}"/><circle cx="48" cy="38" r="17" fill="white" fill-opacity=".92"/><path d="M18 92c3-22 15-34 30-34s27 12 30 34" fill="white" fill-opacity=".92"/></svg>`;
  return `data:image/svg+xml,${encodeURIComponent(svg)}`;
}

function tidalExampleImageDataUri(label: string) {
  const safeLabel = label.replace(/[<>&]/g, "").slice(0, 28) || "Sample image";
  const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 675"><defs><linearGradient id="g" x1="0" x2="1" y1="0" y2="1"><stop stop-color="#171717"/><stop offset="1" stop-color="#555555"/></linearGradient></defs><rect width="1200" height="675" fill="url(#g)"/><circle cx="950" cy="100" r="260" fill="white" fill-opacity=".08"/><text x="80" y="570" fill="white" font-family="system-ui,sans-serif" font-size="64" font-weight="700">${safeLabel}</text></svg>`;
  return `data:image/svg+xml,${encodeURIComponent(svg)}`;
}

const tidalExampleStyles = ".tidal-scope .media-showcase-demo {\n  display: grid;\n  width: min(100%, 880px);\n  min-width: 0;\n  gap: 10px;\n}\n\n.tidal-scope .media-showcase-storyboard,\n.tidal-scope .media-showcase-audio-fallback {\n  width: 100%;\n  height: 100%;\n  min-height: inherit;\n}\n\n.tidal-scope .media-showcase-storyboard {\n  display: grid;\n  grid-template-rows: auto minmax(0, 1fr);\n  padding: clamp(14px, 4cqi, 34px);\n  background:\n    radial-gradient(circle at 18% 22%, var(--t-wash), transparent 34%),\n    var(--t-canvas);\n}\n\n.tidal-scope .media-showcase-storyboard-bar {\n  display: grid;\n  min-height: 44px;\n  grid-template-columns: 12px minmax(0, 1fr) auto;\n  align-items: center;\n  gap: 10px;\n  border-bottom: 1px solid var(--t-border);\n  color: var(--t-muted);\n  font-size: 11px;\n  font-weight: 680;\n  line-height: 1.35;\n}\n\n.tidal-scope .media-showcase-storyboard-bar > span {\n  min-width: 0;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .media-showcase-storyboard-bar > span:first-child {\n  width: 8px;\n  height: 8px;\n  border-radius: 50%;\n  background: var(--t-ink);\n}\n\n.tidal-scope .media-showcase-storyboard-body {\n  display: grid;\n  min-width: 0;\n  grid-template-columns: minmax(0, 1.2fr) minmax(140px, 0.8fr);\n  align-items: center;\n  gap: clamp(18px, 6cqi, 58px);\n  padding-block: clamp(22px, 7cqi, 64px);\n}\n\n.tidal-scope .media-showcase-storyboard-copy {\n  display: grid;\n  min-width: 0;\n  gap: 9px;\n}\n\n.tidal-scope .media-showcase-storyboard-copy small {\n  color: var(--t-muted);\n  font-size: 11px;\n  font-weight: 720;\n  letter-spacing: 0.06em;\n  text-transform: uppercase;\n}\n\n.tidal-scope .media-showcase-storyboard-copy strong {\n  max-width: 15ch;\n  font-family: var(--t-display);\n  font-size: clamp(26px, 6cqi, 54px);\n  font-weight: 500;\n  letter-spacing: -0.055em;\n  line-height: 0.95;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .media-showcase-storyboard-copy > span {\n  display: block;\n  width: min(100%, 240px);\n  height: 7px;\n  border-radius: 99px;\n  background: var(--t-line);\n}\n\n.tidal-scope .media-showcase-storyboard-copy > span:last-child {\n  width: min(72%, 170px);\n}\n\n.tidal-scope .media-showcase-storyboard-panel {\n  display: grid;\n  min-width: 0;\n  gap: 12px;\n  padding: clamp(16px, 4cqi, 28px);\n  border: 1px solid var(--t-border-strong);\n  border-radius: 16px;\n  background: var(--t-surface);\n  box-shadow: var(--t-shadow-soft);\n}\n\n.tidal-scope .media-showcase-storyboard-panel > span {\n  color: var(--t-muted);\n  font-size: 11px;\n  font-weight: 700;\n  text-transform: uppercase;\n}\n\n.tidal-scope .media-showcase-storyboard-panel > strong {\n  font-size: clamp(36px, 8cqi, 64px);\n  font-weight: 530;\n  letter-spacing: -0.06em;\n  line-height: 0.9;\n}\n\n.tidal-scope .media-showcase-storyboard-panel > div {\n  display: flex;\n  height: 54px;\n  align-items: end;\n  gap: 5px;\n}\n\n.tidal-scope .media-showcase-storyboard-panel i {\n  flex: 1;\n  height: 38%;\n  border-radius: 4px 4px 0 0;\n  background: var(--t-ink);\n}\n\n.tidal-scope .media-showcase-storyboard-panel i:nth-child(2) {\n  height: 66%;\n}\n\n.tidal-scope .media-showcase-storyboard-panel i:nth-child(3) {\n  height: 92%;\n}\n\n.tidal-scope .media-showcase-storyboard-panel i:nth-child(4) {\n  height: 54%;\n}\n\n.tidal-scope .media-showcase-audio-fallback {\n  display: grid;\n  place-items: center;\n  align-content: center;\n  gap: 9px;\n  padding: 24px;\n  background: var(--t-canvas);\n  text-align: center;\n}\n\n.tidal-scope .media-showcase-audio-fallback > div {\n  display: flex;\n  min-height: 94px;\n  align-items: center;\n  gap: 5px;\n}\n\n.tidal-scope .media-showcase-audio-fallback > div > span {\n  width: 5px;\n  max-height: 70px;\n  border-radius: 999px;\n  background: var(--t-ink);\n}\n\n.tidal-scope .media-showcase-audio-fallback strong {\n  font-size: clamp(24px, 5cqi, 40px);\n  font-weight: 560;\n  letter-spacing: -0.045em;\n}\n\n.tidal-scope .media-showcase-audio-fallback p,\n.tidal-scope .media-showcase-demo-note {\n  margin: 0;\n  color: var(--t-muted);\n  font-size: 11px;\n  line-height: 1.5;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .media-showcase-demo-note {\n  text-align: center;\n}\n\n.tidal-scope .media-showcase-thumb-mark,\n.tidal-scope .media-showcase-thumb-wave {\n  display: grid;\n  place-items: center;\n  background: var(--t-surface);\n  color: var(--t-ink);\n  font-size: 11px;\n  font-weight: 760;\n}\n\n.tidal-scope .media-showcase-thumb-wave {\n  letter-spacing: -0.18em;\n}\n\n@container tidal-media-showcase (max-width: 480px) {\n  .media-showcase-storyboard-body {\n    grid-template-columns: minmax(0, 1fr);\n    gap: 18px;\n    padding-block: 20px;\n  }\n\n  .media-showcase-storyboard-panel {\n    grid-template-columns: minmax(0, 1fr) auto;\n    align-items: center;\n  }\n\n  .media-showcase-storyboard-panel > div {\n    grid-column: 1 / -1;\n  }\n}\n\n@container tidal-media-showcase (max-width: 240px) {\n  .media-showcase-storyboard {\n    padding: 10px;\n  }\n\n  .media-showcase-storyboard-bar > span:last-child,\n  .media-showcase-storyboard-panel > div {\n    display: none;\n  }\n\n  .media-showcase-storyboard-panel {\n    grid-template-columns: minmax(0, 1fr);\n  }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .tidal-scope .media-showcase-storyboard,\n  .tidal-scope .media-showcase-audio-fallback {\n    scroll-behavior: auto;\n  }\n}";

function StoryboardFrame() {
  return (
    <div
      className="media-showcase-storyboard"
      aria-label="Workspace storyboard frame"
    >
      <div className="media-showcase-storyboard-bar">
        <span />
        <span>Workspace overview</span>
        <span>Frame 02</span>
      </div>
      <div className="media-showcase-storyboard-body">
        <div className="media-showcase-storyboard-copy">
          <small>Release brief</small>
          <strong>Review the plan in one place.</strong>
          <span />
          <span />
        </div>
        <div className="media-showcase-storyboard-panel">
          <span>Open</span>
          <strong>12</strong>
          <div>
            <i />
            <i />
            <i />
            <i />
          </div>
        </div>
      </div>
    </div>
  );
}

function AudioFallback() {
  return (
    <div
      className="media-showcase-audio-fallback"
      role="img"
      aria-label="Audio note fallback"
    >
      <div aria-hidden="true">
        {Array.from({ length: 18 }, (_, index) => (
          <span
            key={index}
            style={{ blockSize: `${18 + ((index * 17) % 52)}px` }}
          />
        ))}
      </div>
      <strong>Audio note</strong>
      <p>No audio file is attached to this local preview.</p>
    </div>
  );
}

export function MediaShowcaseDemo() {
  const [currentItemId, setCurrentItemId] = useState("cover");
  const items = useMemo<readonly TidalMediaShowcaseItem[]>(
    () => [
      {
        id: "cover",
        kind: "image",
        label: "Launch cover",
        src: tidalExampleImageDataUri("TidalUI sample media"),
        alt: "TidalUI component montage with editorial type and soft color fields",
        meta: "Image · 1200 × 630",
        caption: "A finished cover image for the sample release brief.",
        thumbnail: <img src={tidalExampleImageDataUri("TidalUI sample media")} alt="" />,
      },
      {
        id: "storyboard",
        kind: "custom",
        label: "Walkthrough frame",
        meta: "Supplied media slot",
        caption:
          "A storyboard frame can stand in until a recording is attached.",
        media: <StoryboardFrame />,
        transcriptLabel: "Read frame notes",
        transcript:
          "The release brief opens with assigned work, review status, and the next action in one compact workspace.",
        thumbnail: <span className="media-showcase-thumb-mark">02</span>,
      },
      {
        id: "audio-note",
        kind: "custom",
        label: "Audio note",
        meta: "Explicit local fallback",
        caption:
          "The transcript remains available when a media file is not supplied.",
        media: <AudioFallback />,
        transcript:
          "Keep the overview concise, preserve the review trail, and make the next action clear.",
        thumbnail: (
          <span className="media-showcase-thumb-wave" aria-hidden="true">
            ||||
          </span>
        ),
      },
    ],
    [],
  );

  return (
    <div className="media-showcase-demo">
      <TidalMediaShowcase
        label="Release media"
        items={items}
        currentItemId={currentItemId}
        onCurrentItemChange={setCurrentItemId}
      />
      <p className="media-showcase-demo-note">
        Sample media. Selection stays in this preview.
      </p>
    </div>
  );
}

export default function AgentExample() {
  return (
    <div className="tidal-scope" data-theme="light" dir="ltr">
      <style>{tidalExampleStyles}</style>
      <MediaShowcaseDemo />
    </div>
  );
}

```

## Gotchas

- The host application owns data, validation, persistence, navigation, and service side effects described by this API.

## Theme and accessibility

{"tokens":["--t-accent","--t-border","--t-border-strong","--t-canvas","--t-danger","--t-display","--t-ease-out","--t-ease-spring","--t-faint","--t-font","--t-ink","--t-line","--t-muted","--t-primary","--t-primary-contrast","--t-radius-card","--t-radius-control","--t-radius-overlay","--t-radius-panel","--t-ring","--t-shadow-lg","--t-shadow-soft","--t-soft","--t-subtle","--t-surface","--t-wash"],"darkMode":true}

{"keyboard":["Tab and Shift+Tab follow the component's native focus order.","Arrow-key behavior follows the exported composite-control implementation."],"aria":"The component wires labels and relationships from consumer-provided visible text or ARIA props; preserve those labels in production.","notes":"Verify focus visibility, text alternatives, contrast, and reduced motion in the final composition."}

Requires a nonblank label, unique nonblank item IDs and labels, a controlled currentItemId, and an onCurrentItemChange proposal callback. Items are an explicit image, video, audio, or custom media-slot union. Images require consumer-owned src and alt; video/audio require consumer-owned src and mediaLabel, always render native controls, never autoplay, and may expose safe native props/refs. Video tracks, poster, audio artwork, thumbnail, caption, meta and transcript content remain consumer-owned. No fetch, upload, recording, playback command, analytics, persistence, media generation or network policy occurs. Unavailable items use native disabled selection. Selection props run first and prevention stops higher callbacks. Direction-aware Left/Right plus Up/Down/Home/End move focus inside only the selection rail, with IME/modifier guards and minimal rail-only reveal; Enter/Space retain native button behavior. Root/list/media/selection native props strip owned or unsafe markup at runtime. Numeric ReactNode content, empty/invalid/unknown selection states, linked consumer errors, native refs with React 19 cleanup, 44px actions, 180/320/390 widths, RTL, long labels, forced colors and reduced motion are supported.
