---
title: "Audio Player | Free React & Tailwind Blocks Component | Motion UI"
canonical: "https://blacknest.dev/motion/c/blocks/audio-player"
github_source: "https://github.com/Rkj0123/motion-ui-skill/blob/main/components/motion/audio-player.tsx"
install_command: "npx motion-ui-skill add audio-player"
dependencies: ["clsx","lucide-react","motion","react","tailwind-merge"]
category: "blocks"
subcategory: "motion"
---

# Audio Player

> Interactive audio player with animated equalizer waveforms, spring play/pause morphs, volume controls, and scrubbing trackbar. When `src` is omitted, it uses a visual timer demo. Inspired by Origin UI (Coss) and KeenThemes ReUI.

## Install

```bash
npx motion-ui-skill add audio-player
```

## Dependencies

- `clsx`
- `lucide-react`
- `motion`
- `react`
- `tailwind-merge`

## Usage

```tsx
"use client";

import { AudioPlayer } from "@/components/motion/audio-player";

export function AudioPlayerExample() {
  return (
    <div className="p-8 flex justify-center">
      <AudioPlayer
        title="Midnight City Serenade"
        artist="Synthetic Dreams"
        durationSeconds={195}
      />
    </div>
  );
}
```

## Props

| Prop | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `title` | `string` | Required | Audio track title. |
| `artist` | `string` | `undefined` | Performer or creator name. |
| `durationSeconds` | `number` | `184` | Total audio duration in seconds. |
| `src` | `string` | `undefined` | Optional audio source URI. |
| `className` | `string` | `undefined` | Container classes. |

## Source Files

- [components/motion/audio-player.tsx](https://github.com/Rkj0123/motion-ui-skill/blob/main/components/motion/audio-player.tsx)
- [lib/ease.ts](https://github.com/Rkj0123/motion-ui-skill/blob/main/lib/ease.ts)
- [lib/hooks/use-haptic.ts](https://github.com/Rkj0123/motion-ui-skill/blob/main/lib/hooks/use-haptic.ts)
- [lib/utils.ts](https://github.com/Rkj0123/motion-ui-skill/blob/main/lib/utils.ts)
