shadcn.io is not affiliated with official shadcn/ui
Tabbed Product Views Hero Block for React
A centred showcase hero with a Shine Button and an outline action over a pill tab switch and one wide product window in a hairline frame that shows a chat, a terminal session or a docs page.
Installation
Overview
A centred showcase hero that shows a product's three surfaces without a scroll. Under a headline, a sentence, a Shine Button and an outline action, a pill-shaped tab switch offers Chat, Code and Docs, and each tab opens the same wide window: a conversation with a deploy assistant, a terminal that types out an install and a deploy, or a quickstart page with its sidebar. The window sits in a hairline frame with + marks on its corners between the page's solid rails, keeps one height whichever tab is open, and its panel fades in as it changes. The window's chat bubble, send button and step marks are foreground tones, so the primary colour stays on the one button. It's built from Tabs, Bubble, Terminal Text, Shine Button, Button and Guides, with CSS transitions only. The copy speaks for Skiff, a deploy workspace. For developer tools that ship a chat, a CLI and docs, and any product with several surfaces of equal weight.
FAQ
How do I change the tabs and what each one shows?
Edit VIEWS at the top of the file: each view has an id, the label on its tab and the window title in its frame's chrome. What a view shows is in ProductView, beside the block, one branch per id: replace a branch with your own content, or add a branch when you add a view. The terminal plays SESSION, where a line starting with $ is a command it types and any other line is output it prints; a line starting with a tick is coloured as a success.
Why doesn't the page move when I switch tabs?
The window has a fixed height (h-96, sm:h-[26rem]), and every view is laid out to fit it, so nothing below it moves whichever tab is open. If a view of yours is taller, raise the height or let that view scroll inside the window.
How do keyboard and screen reader users use the tabs?
The switch is our Tabs, a real tab list named Product view: Tab moves into it, and the arrow keys move between Chat, Code and Docs, opening each one's panel as they go; Tab again moves into the open panel. The panels hold real text: the chat's messages, each prefixed "Assistant" or "You" for screen readers, the terminal's session, read once as a whole, and the docs excerpt. Only the window chrome, the composer and the docs sidebar are hidden.
When does the terminal type, and what about reduced motion?
The Code panel mounts when its tab opens, and Terminal Text starts typing once the panel is in view: the commands character by character, each output line after its command, ending on a blinking caret. It's CSS animation, with no timer. With reduced motion the whole session is shown at once, the panels swap without fading, and the page's entrance doesn't play.
How do I track which view visitors open?
Listen for the tab change on the root and send the new view to your analytics: onValueChange on Tabs gives the new value. Compare which view was open last before a click on the call to action to see which surface sells the product, and put that one first.
When should I use tabbed views instead of a split hero with one screenshot?
Use tabbed views when the product has several surfaces that matter equally and a visitor should be able to look at each without scrolling. Use a split hero with a single visual when one surface carries the pitch and the rest can wait further down the page; a tab switch asks for a click before the second view is seen.
Related
- Pro
Tabbed Feature Showcase Hero
Interactive demosA split hero for a code assistant: a headline, a Shine Button and an outline action at the start, and at the end a framed card with underline tabs for features, integrations and pricing.
- Pro
Centered Audience Tabs Hero
Interactive demosA compact centred hero with a role switch in a band that swaps the headline, the subtitle and a band of three checklist cells for designers, engineers and product teams.
- Pro
Split Layout Tab-Switch Browser Hero
Interactive demosA showcase hero for a project workspace: the headline beside its pitch and a Shine Button, then a browser window in a hairline frame whose tabs switch between three drawn views: Projects, Analytics and Settings.
- 123Pro
Centered Version Switcher Hero
Interactive demosA compact centred hero whose version tabs swap the headline, the subtitle and three what's-new cells for each major release of a rules engine.
- Pro
Centered Feature Cards Grid Hero
Features and tablesA showcase hero between solid rails: an announcement link, a centred headline and a Shine Button, over three feature cells with overshooting hairlines, each led by a greyscale vignette of the feature.
- Pro
Bento Grid Feature Showcase Hero
Features and tablesA showcase hero with the headline on one side and the pitch on the other, over a bento of six labelled product views in cells that share hairlines.