Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-media-frame.json --yes

Media frame

Pro

A box for a photo, a map, a cover or an upload, at a fixed shape, holding a picture or, until there is one, its empty state, for React and Tailwind CSS. Part of Goop Pro.

Pick a look (each shape empty or holding media, a picture that fails to load, the frame in a card) or switch the shape (auto takes the media’s own height), turn loading on, hold the empty state with its icon and action, a block of media or a broken picture with its fallback (the icon or your own words), add a caption. No picture is loaded: the example ships no image, so the media is a plain block of our own, and the broken picture’s source is an empty address that never loads.

When to use

  • A box for a photo, a map, a cover or an upload, at a fixed shape, holding a picture or, until there is one, its empty state.
  • Use it wherever a picture will stand (a cover, a product photo, a map, an upload), never Empty or an Avatar bent into a box. Give it a width; the ratio gives its height.

Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Media frame on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

Terminal
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-media-frame.json --yes
PROMPT
Add the Goop Media frame to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { MediaFrameMedia } from '@/components/ui/goop/media-frame';

import { Button } from '@/components/ui/goop/button';
import { MediaFrame, MediaFrameEmpty, MediaFrameImage } from '@/components/ui/goop/media-frame';

<>
  <MediaFrame ratio="square" className="w-60">
    <MediaFrameEmpty action={<Button variant="outline">Choose photo</Button>}>No cover art yet</MediaFrameEmpty>
  </MediaFrame>
  <MediaFrame ratio="16/9">
    <MediaFrameEmpty icon="map-2">The route map goes here</MediaFrameEmpty>
  </MediaFrame>
  <MediaFrame ratio="4/3" caption="The harbour from the north wall.">
    <MediaFrameImage src="/harbour.jpg" alt="Boats in a harbour at dawn" fallback="Boats in a harbour at dawn" />
  </MediaFrame>
</>
  • Fits: list, record: row (media: some).
  • Also known as: AspectRatio, ImagePlaceholder, Figure.
  • height, width, padding, gap, corner, background, text: add no class for these.

API reference

Options
OptionTypeWhat it does
ratio?'square' | '4/3' | '16/9' | 'auto' = '16/9'The box's shape; auto the picture's own height.
loading?boolean = falseWhile true the box holds a skeleton and says it is busy; the picture fades in after.
caption?ReactNodeA line under the box saying what the picture shows; it names the figure.
children?ReactNodeThe picture (MediaFrameImage, or your own element in MediaFrameMedia) or its empty state (MediaFrameEmpty).
Parts
PartWhat it is
MediaFrameImageThe picture; alt: string — What the picture shows, for a reader who cannot see it ("" for a picture that says nothing); fit?: 'cover' | 'contain' = 'cover' — cover fills the box, cutting the rest; contain shows the whole picture; fallback?: ReactNode — What the box shows when the picture fails to load: by default the pack icon photo-off on the frame's fill
MediaFrameMediaYour own media element (a picture, a video, a map) as the frame's picture
MediaFrameEmptyWhat the box shows until there is a picture; icon?: IconName — The pack icon over the words (default photo; map-2 for a map); action?: ReactNode — An action under the words: the theme's Button ("Choose photo"); children: ReactNode — One short line saying what goes here ("No photo yet")
  • data-slot values (to select a part by): media-frame, media-frame-box, media-frame-caption, media-frame-empty, media-frame-empty-action, media-frame-empty-icon, media-frame-empty-words, media-frame-fallback, media-frame-fallback-icon, media-frame-image, media-frame-media, media-frame-skeleton

Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

goop.so/themes/meadow/components/media-frame.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-media-frame.json --yes

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.