Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Split Layout Music Player Hero Block for React

A compact split hero for an audio product: copy and a Shine Button beside a narrow music player on a tinted panel behind a divider, with a waveform and a queue.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A compact split-layout hero with a minimal music player, for React with Base UI, between solid rails. At the start, an announcement pill, a headline, a sentence, a three-point checklist, a ShineButton and an outline Button, both links. Behind a divider, with a + mark where it meets the top rule, a tinted panel holds a narrow player card: a cover drawn in CSS and the playing track, a waveform of 36 thin bars filled up to the playhead, a Progress bar with the elapsed and total time, previous, pause and next controls, and an "Up next" list of four tracks with the playing one marked. The playhead, the pause button and the bars are in foreground tones, so the Shine Button is the only primary control. Everything settles in with a CSS transition that stays still under reduced motion. It's built from Announcement, Status, Shine Button, Button, Card, Guides and Progress with Lucide icons and Tailwind CSS. Made for music streaming products, podcast players, audio editing tools and voice-first apps.

FAQ

How do I change the waveform and the queue?

The waveform reads HEIGHTS, a list of 36 percentages; replace it with peaks from your own audio analysis, keeping the values fixed so the server and the browser draw the same bars. PROGRESS and ELAPSED set the playhead: the bars before it fill in the foreground colour, and the Progress bar takes the same value. The queue reads TRACKS, whose first entry is the playing track; its duration is also the total time under the bar.

How do I turn the mockup into a working player?

Take aria-hidden and inert off the panel, then make each part real: an audio element for playback, our Button with size="icon" and an aria-label ("Previous track", "Pause", "Next track") for each transport icon, and a Slider instead of the Progress bar so the playhead can be dragged. Fill HEIGHTS from the Web Audio API's analyser if you want the waveform to follow the sound.

How do screen readers read the hero?

The headline is the block's one h1, the checklist is a list with its ticks hidden, and the pill and both calls to action are links named by their text. The player is an illustration: the whole panel is aria-hidden and inert, so screen readers skip it and nothing in it takes focus. Once you make it a real player, label every control.

How does the hero adapt to phones and tablets?

The two halves stack below the lg breakpoint, with the copy first and the player under it, so the Shine Button is on the first screen. The player card is at most max-w-sm and fills narrower screens; the waveform's 36 bars fit in it down to 320px. The two buttons wrap onto two lines when the row runs out of room. The headline steps down from text-5xl to text-4xl.

Which colours does the player use?

Theme tokens only, in greyscale. The played bars, the playhead, the cover and the pause button are foreground, the unplayed bars are muted-foreground at low opacity, and the card is our Card on a muted panel. So the player follows your theme in light and dark, and your accent colour stays on the one call to action.

When should I use a music player hero instead of a video player hero?

Use the music player when your product is audio first: streaming, podcasts, voice tools or audio editing. The waveform and queue say so before a word is read. Use a video player hero when what your product makes is something to watch.

  • Pro

    A compact split hero for a trip planner: the headline and a Shine Button beside a dark video player in a hairline frame, paused part of the way in over a poster of a day's itinerary.

  • Pro

    A reverse split hero for a deploy platform: a wide video whose poster is the product's own deploy screen over a ruled list of its chapters, beside the headline, a checklist and a Shine Button.

  • Pro

    Video Player Hero

    Mobile and media

    A reverse split hero for a video editor: a dark player window in a hairline frame beside the copy, a Shine Button and a second action, across a solid divider.

  • Pro

    Video Modal Hero

    Mobile and media

    A showcase hero with a centered headline over a wide 16:9 video poster drawn from the product's UI, in a hairline frame, whose play button opens the demo in a dialog.

  • Pro

    A reverse split hero for a mobile app: two phones rise from the foot of a tinted panel on the start side, with a Shine Button to the App Store, an outline link to Google Play and a rider count at the end.

  • Pro

    Split Phone Frame Hero

    Mobile and media

    A split hero for a mobile app: copy, store links and social proof beside a phone frame that slides out of a hairline frame, cut off at its foot.