shadcn.io is not affiliated with official shadcn/ui
Tabbed Carousel Banner Block for React
A tabbed announcement for a documentation platform: a card with three underline tabs (What's new, Tips, Updates) and a panel under them, driven by the visitor, with no autoplay.
Installation
Overview
A tabbed announcement for React with Base UI, for a slot that has three things to say and lets the visitor choose. A card sits between the page's solid rails with a row of underline tabs on its own hairline, What's new, Tips and Updates, and under it the chosen panel: a badge, a headline, two lines and an underlined link. Nothing rotates by itself; the arrow keys move between the tabs, and the card keeps one height whichever tab is open because the three panels share one grid cell. On a narrow phone the tab row scrolls sideways. It's built from Tabs, Badge and Guides, with CSS for the entrance and your theme's tokens for every colour. For changelogs, feature news and docs headers that group their messages by kind.
FAQ
How do I change the tabs and their panels?
Edit ENTRIES at the top of the file: each entry is an id, the tab's label, and the panel's badge, title, line, link and href. The tabs and the panels are both drawn from the list, so adding a fourth entry adds both.
Why doesn't the card change height between tabs?
All panels stay mounted and take the same grid cell, and the cell is as tall as the tallest panel. The closed ones are hidden by the tabs: invisible, out of the tab order and out of the page's reading order, so a keyboard never lands on a hidden link.
Each panel has keepMounted, so the closed ones stay in the page.
Which keys work?
Tab moves focus into the tab row, the arrow keys move between the tabs (a tab opens its panel when it takes focus), Home and End jump to the first and last, and Tab again moves on to the open panel's link.
Why is there no autoplay?
The rotating carousel banner owns that: it needs a Pause button, pausing on hover and focus, and a reduced-motion guard. Here the visitor drives, so there is nothing to pause, and nothing moves under their cursor.
Related
- Pro
Rotating Carousel Banner
Disclosures and tabsA rotating announcement for a design-system library in a framed figure: three slides cross-fade in one place, with a Pause button, pause on hover and focus, and dots that name their slide.
- $Pro
Expandable Code Banner
Disclosures and tabsAn install notice for a CLI toolkit as a disclosure: a header with a version badge opens package-manager tabs and the command in a mono box with a Copy button.
- v4.2123Pro
Numbered Changelog Banner
Numbered listsA release banner for a release-management tool: the latest version set large at the start, and the three before it as a numbered list at the end, split by a solid divider.
- 123Pro
Numbered Feature Highlights Banner
Numbered listsThree numbered highlights for a workflow tool as a framed accordion: open one row to read a sentence and a link, one at a time, beside a heading.
- Pro
Collapsible Details Banner
Disclosures and tabsAn incident notice for a status-page product as a disclosure: one summary line with an Investigating badge, and open it explains the incident and lists the four affected services.
- Pro
Top Bar Tab Switch Banner
Utility barsA segmented control in a slim bar whose choice rewrites a one-line summary beside it.