content-cards
beginner
music
player
minimal
clean
ui
Category · Content Cards Difficulty Level · Beginner Published on · August 18, 2025

Minimal Music Player

A clean and minimalist music player interface with essential controls and elegant typography.

#music #player #minimal #clean #ui

Responsive Design

Yes

Dark Mode Support

No

lines

409

Browser Compatibility

Chrome · Firefox · Safari · Edge

Live Preview

Interact with the component without leaving the page.

350px

Overview

A clean and minimalist music player interface with essential controls and elegant typography.

How to use

  1. Copy the HTML markup into your page.
  2. Paste the CSS into your stylesheet and ensure the selectors match your markup.
  3. Paste the JavaScript and load it after the markup.
  4. Adjust spacing, colors, and text to match your design system.

Customization tips

  • Rename class names to avoid collisions with your existing CSS.
  • Replace hard-coded colors with CSS variables for theming.
  • Verify the layout at 320px, 768px, and 1024px widths.

HTML

56

lines

CSS

193

lines

JavaScript

160

lines


                <div class="minimal-player">
  <div class="track-info">
    <h2 id="track-title">Peaceful Morning</h2>
    <p id="track-artist">Calm Collective</p>
  </div>
  
  <div class="progress-container">
    <div class="time-info">
      <span id="current-time">1:23</span>
      <span id="total-time">4:15</span>
    </div>
    <div class="progress-track">
      <div class="progress-bar" id="progress-bar"></div>
    </div>
  </div>
  
  <div class="controls">
    <button class="btn-control" id="prev-btn" aria-label="Previous track">
      <svg viewBox="0 0 24 24" fill="currentColor">
        <path d="M6 6h2v12H6zm3.5 6l8.5 6V6z"/>
      </svg>
    </button>
    
    <button class="btn-play" id="play-btn" aria-label="Play/Pause">
      <svg class="play-icon" viewBox="0 0 24 24" fill="currentColor">
        <path d="M8 5v14l11-7z"/>
      </svg>
      <svg class="pause-icon" viewBox="0 0 24 24" fill="currentColor" style="display: none;">
        <path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/>
      </svg>
    </button>
    
    <button class="btn-control" id="next-btn" aria-label="Next track">
      <svg viewBox="0 0 24 24" fill="currentColor">
        <path d="M6 18l8.5-6L6 6v12zM16 6v12h2V6h-2z"/>
      </svg>
    </button>
  </div>
  
  <div class="playlist-minimal">
    <div class="track-item active" data-title="Peaceful Morning" data-artist="Calm Collective" data-duration="4:15">
      <span class="track-name">Peaceful Morning</span>
      <span class="track-time">4:15</span>
    </div>
    <div class="track-item" data-title="Gentle Breeze" data-artist="Nature Sounds" data-duration="3:42">
      <span class="track-name">Gentle Breeze</span>
      <span class="track-time">3:42</span>
    </div>
    <div class="track-item" data-title="Quiet Moments" data-artist="Ambient Space" data-duration="5:18">
      <span class="track-name">Quiet Moments</span>
      <span class="track-time">5:18</span>
    </div>
  </div>
  
  <audio id="audio-element"></audio>
</div>

              
56lines
1979characters
HTMLLanguage

Browser Compatibility

Chrome

>= 60

Firefox

>= 55

Safari

>= 10

Edge

>= 15

Related Code Snippets

Explore template packs

Need larger building blocks? Browse responsive landing pages and component bundles.

Open HTML Template Library ->