Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Video Intro Dialog Onboarding Block for React

A sketch-to-slides tool's intro dialog that never plays a video: a poster drawn as the editor with a playhead, four chapters as buttons, a collapsible transcript and one link to the real video.

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

Point people at a short video without pretending to play it, with this intro dialog for React with Base UI. It opens from the first deck of Hollowby, a sketch-to-slides tool: the page header holds an outline Button, Watch intro, and the editor with its blank deck is drawn under a soft scrim inside a hairline frame. The Dialog shows a poster drawn as the editor's own UI, with a play mark, the words “No video in this demo”, and a scrubber with a playhead. Four chapters sit beside it as buttons: pressing one moves the playhead, redraws the poster and changes the line of what you'll see. A Collapsible holds the transcript, and Open the video, the only Shine Button, is a link to where the real video lives. For preview the dialog is drawn open in place; Watch intro opens the real Dialog with the same content. For product intros, tutorials and any first-run video.

FAQ

Why is the dialog already open, and what do I keep?

So you can see it without a click. On load the dialog is a copy drawn in place over the editor: a native dialog element that isn't modal, so nothing is trapped or focused. Watch intro opens the real Dialog, modal, with its focus trap, Escape and focus return, and the copy stays closed until a reload. Both show TourContent and share the block's state, so a chapter picked in the copy is selected in the real one. In your app keep the Dialog and drop the copy: the "in-place" state, the scrim and the dialog element.

Why doesn't anything play, and how do I add the real video?

A demo that fakes a player is worse than an honest poster, so nothing here is media: the poster is a drawing, and the chip says so. In your app point Open the video at the page or file where it lives (change the href), or replace the poster box with your player or an embed and drive the playhead from it: CHAPTERS already holds each chapter's start in seconds and TOTAL the length. Use a photo or frame from your own video only if you hold the rights to it.

What do the chapters do?

Each chapter is a toggle button, pressed while it's showing. Pressing one moves the playhead to its start, redraws the poster with that chapter's scene and rewrites the line under it, and a polite status message says the chapter, where it starts and that no video plays. They're plain buttons in a list, so Tab reaches each one; on a phone the list scrolls sideways under the poster.

How does the transcript work?

It's a Collapsible with a text button: closed by default, it opens a short scroll region with each chapter's words and start time. The region takes a tab stop so a keyboard can scroll it, and whether it's open belongs to the block, so it stays as you left it between the copy and the real dialog.

Is it accessible from the keyboard?

Yes. The real dialog is named by its title and described by its sentence, focus starts inside it and stays there until it closes, and Escape, Maybe later and the close button all return focus to Watch intro. The trigger is passed to DialogTrigger through render, and the dialog is controlled with open and onOpenChange. The copy shown on load moves no focus; Escape inside it, Maybe later and its close button close it and put focus on Watch intro.

How does it look on a phone?

The copy shown on load docks to the foot of the page as a bottom sheet with the poster over the chapter list, the actions pinned at the bottom and the body scrolling above them. The real dialog keeps the Dialog's own phone layout: a sheet stuck to the bottom of the screen.

  • Pro

    Welcome Dialog Onboarding

    Welcome and tours

    A planning board's first-run welcome: a dialog shown open over a drawn three-lane board, with a greeting, three things to try first, Start the tour and Explore on my own, and a Replay welcome button that opens the real dialog.

  • Pro

    Product Tour Onboarding

    Welcome and tours

    A four-stop product tour over a drawn analytics dashboard: a coachmark points at the metrics, the segments, the report and the settings one at a time, with the part lit and the rest dimmed, and a Replay tour button that starts the real Tour.

  • Pro

    A learn-by-doing walkthrough in a framed window: a drawn design-review app beside a docked guide of four tasks, where the control for the current task is ringed and doing it, by click or by key, opens the next.

  • Pro

    Help Sheet Onboarding

    Welcome and tours

    A support inbox's help sheet from the end edge: a search that filters eight articles as you type with the matches marked, the four ways to reach support as real links, and an empty state that offers Clear search.

  • Pro

    Invite Members Dialog

    Share and invite

    A household calendar's Members page with its invite dialog shown open: one email field that knows the household's domain, so an outside address joins as a guest, the people who already have access, and a Send invite button that adds a pending row.

  • Pro

    A course library's first-run track picker as a whole screen: three tracks in a single-open accordion where the open row is the choice, its first lessons, and a line and a button worked out from the pick.