shadcn.io is not affiliated with official shadcn/ui
Split Panel Video Player Preview CTA Block for React
A split call to action for a deploy platform: the pitch and a Shine Button at the start, a wide demo player in a hairline frame at the end: a poster drawn from the product over three chapter tabs.
Installation
Overview
A split call to action for a product demo, for React with Base UI, between solid rails. At the start sit a quiet badge, a headline, a short paragraph, a three-point checklist and the Shine Button, the block's only primary control, reading "Watch the demo" with the full length beside it. Past a solid divider, the wider second column holds a player in a hairline frame with + marks on its corners: a 16:9 poster drawn from the product's own UI (a deploy window with a play mark, a caption naming the chapter and a length chip) above a Tabs list of three chapters. Each tab opens a real panel: a title, a sentence, and what you will see with its length. Switching tabs changes the poster's caption and chip. It's built from Shine Button, Badge, Aspect Ratio, Grid Pattern, Tabs and Guides with Lucide icons and Tailwind CSS, and it follows your theme. On phones the copy and the button come first and the player follows. Made for product tour, demo and launch pages that want to show what is in a video before anyone presses play.
FAQ
How do I change the chapters?
Edit CHAPTERS at the top of the file. Each chapter has an id, the tab's label, its length in seconds, a title, a summary and a list of what you will see. The lengths are shown as minutes and seconds, and the total next to the button is their sum, so the numbers never disagree. Keep the list to about three chapters: the tabs share the card's width and fit down to 320px.
Is the poster a video? How do I use a real one?
No. The poster is a picture of one: a small drawing of the product's window under a play mark, and nothing in it is clickable. It is hidden from screen readers, since the tabs hold the same information, and it never takes focus. The Shine Button is the link that opens your video, so point its href at your demo page or player. To show a real thumbnail, put an img with object-cover inside the AspectRatio, in place of the GridPattern and the drawn window.
On Base UI, the Shine Button renders its link with render={<a href="…" />} and nativeButton={false}.
How do the tabs work?
They are our Tabs, controlled by the block so the poster can follow them: the arrow keys move between chapters, Home and End jump to the first and last, and the panel below is a tab stop of its own. Each tab opens its own panel, rather than a button that only changes a caption.
Does the card change height when I switch tabs?
No. Only the open panel is in the page, so each panel carries an invisible, screen-reader-hidden copy of every chapter's detail stacked in the same grid cell. The panel is always as tall as the tallest chapter, and the poster and the buttons around it stay where they are.
How does a screen reader read it?
The tab list is named Demo chapters, with each tab named by its label. The open panel reads its title as a heading, its sentence, and its list of what you will see, with the chapter's length. The play mark, the poster's caption and the length chip are decoration, and so are the checklist ticks.
Related
- Pro
Split Panel Product Mockup CTA
Product previewsA split call to action for a browser extension: the pitch and a Shine Button at the start, its popup with working bookmarks in a hairline frame at the end, and a closing band of three ruled benefits.
- Pro
Split Panel Calendar Grid CTA
Pickers and togglesA split call to action beside a week-by-time availability grid on a framed card: pick a free slot and the Shine Button names it.
- Pro
Split Panel Crosshair Visual CTA
Product previewsA split call to action beside a reticle field that fills its half of the block edge to edge: crosshair lines follow the pointer or the arrow keys, with a live coordinate readout.
- Pro
Split Layout Travel Video Hero
Mobile and mediaA 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
Video Modal Hero
Mobile and mediaA 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
Split Layout Video Player Hero
Mobile and mediaA 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.