Audio Player

Minimal React audio player row with a play and pause toggle, title, subtitle and an accessible progress bar. Controlled, so it works with any audio source.

src/registry/ui/audio-player.tsx/r/audio-player.json

Installation#

bash
npx shadcn@latest add @minidev/audio-player

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/audio-player.json

Usage#

tsx
import { AudioPlayer } from "@/components/ui/audio-player"

export function Example() {
  return <AudioPlayer />
}

API reference#

AudioPlayer props
PropTypeDefault
title*string-
subtitlestring-
playingboolean-
onToggle() => void-
progressnumber0
classNamestring-

* required

Dependencies#

npm

lucide-react

Built from

All media and upload components