PU-Audio Component

A customizable audio player component with playback controls and volume management

Usage

Basic Usage

0:00 / 0:00
PropTypeRequiredDefaultDescription
srcstringYes-URL of the audio file
  • Play/Pause controls
  • Seek bar with time tracking
  • Volume control with mute toggle
  • Responsive design
  • Smooth animations
  • Base styling with Tailwind:
    .audio-container {
      @apply relative w-full max-w-lg border-2 border-primary-light-500 
            rounded-lg shadow-lg p-4 flex items-center gap-3 bg-white;
    }
    
    .controls {
      @apply flex items-center gap-3;
    }
    
  • Interactive elements:
    button {
      @apply transition-transform transform hover:scale-110;
    }
    
    input[type="range"] {
      @apply cursor-pointer accent-primary-light-500;
    }
    
  • PUIcon for control icons
  • Tailwind CSS for styling
  • Vue 3 Composition API