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

Audio player

Pro

A recording played in place, such as a meeting's audio on its notes, for React and Tailwind CSS. Part of Goop Pro.

This part takes no options of its own: it is set by what you put in it.

When to use

  • A recording played in place, such as a meeting's audio on its notes.

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 Audio player 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-audio-player.json --yes
PROMPT
Add the Goop Audio player to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { useState } from 'react';
import { AudioPlayer } from '@/components/ui/goop/audio-player';

function VisitRecording() {
  const [playing, setPlaying] = useState(false);
  const [speed, setSpeed] = useState(1);
  return (
    <div className="flex flex-col gap-2">
      <AudioPlayer
        src="/recordings/visit.mp3"
        aria-label="Visit recording"
        duration={70}
        speed={speed}
        onSpeedChange={setSpeed}
        onPlayingChange={setPlaying}
      />
      <p className="text-sm text-muted-foreground">{playing ? 'Playing' : 'Paused'}</p>
    </div>
  );
}
  • Fits: record, chat: body.
  • In a record's property band: <Properties variant="band"><PropertyRow label="Audio"><AudioPlayer src={url} aria-label="Recording" /></PropertyRow></Properties>. Give duration when you already know the length (your server's), so it shows before the file answers.
  • height, width, padding, gap, corner, text, motion: add no class for these.

API reference

  • data-slot values (to select a part by): audio-player, audio-player-mute, audio-player-play, audio-player-speed, audio-player-speed-number, audio-player-time, audio-player-timeline

AudioPlayer: every option

TSX
import { AudioPlayer } from '@/components/ui/goop/audio-player';

Options

  • src?: string — The recording's address, given to the player's audio element; none, and every control is off.
  • aria-label: string — The player's name for assistive technology.
  • duration?: number — The length in seconds when you already know it, shown until the file says its own.
  • disabled?: boolean = false — Off: every control faded and none answering.
  • speeds?: readonly number[] — The speeds the menu offers, in order (default 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2).
  • speed?: number — The playback speed, when you hold it; with onSpeedChange.
  • defaultSpeed?: number = 1 — The playback speed at first, uncontrolled (default 1).
  • onSpeedChange?: (speed: number) => void — Called with the speed chosen in the menu.
  • onPlayingChange?: (playing: boolean) => void — Called when the recording starts (true) and when it stops: paused or played to its end (false).
  • formatTime?: (seconds: number) => string — Seconds in words, for the two times and the scrubber's value (default 01:10, 1:02:05).
  • formatSeekValue?: (time: string, duration: string) => string — What the scrubber says, from the two times in words (default 00:12 of 01:10).
  • playLabel?: string = 'Play' — The play button's name while stopped.
  • pauseLabel?: string = 'Pause' — The play button's name while playing.
  • muteLabel?: string = 'Mute' — The mute button's name; aria-pressed says whether it is on.
  • seekLabel?: string = 'Seek' — The scrubber's name.
  • speedLabel?: string = 'Playback speed' — The speed menu's heading, and the speed button's name before the speed.
  • menuProps?: ComponentProps<typeof DropdownMenu> — The speed menu's root props: open, defaultOpen, onOpenChange, modal.
  • menuContentProps?: ComponentProps<typeof DropdownMenuContent> — The speed menu's panel props: container, side, align and the rest.
  • State: speed (speed / defaultSpeed / onSpeedChange)

Keyboard

KeyWhat it does
TabReach play, the scrubber, mute and speed in that order
EnterOn play: play or pause; on mute: mute or unmute; on speed: open its menu
SpaceOn play: play or pause; on mute: mute or unmute; on speed: open its menu
ArrowLeft ArrowRightOn the scrubber: seek a second back or on
PageUp PageDownOn the scrubber: seek ten seconds
Home EndOn the scrubber: to the start or the end
ArrowUp ArrowDownIn the speed menu: move the lit row
EscapeIn the speed menu: close, the focus back on the speed button

Accessibility

  • The native element answers the keyboard.
  • hover, active, focus-visible: the browser's own (:hover, :active, :focus-visible): write nothing

Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:

StateDrawn by
disabledthe prop disabled

Motion

  • The part sets its own motion: add no transition or animation of your own.

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/audio-player.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-audio-player.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.