shadcn.io is not affiliated with official shadcn/ui
Sheet examples · Multi Section
Sheet with Tabs for React
A right-side project sheet with Overview, Activity and Settings tabs that switch the text below them.
Three views in one sheet: Tabs with the underline style switch between Overview, Activity and Settings, and the text under them changes with the tab. The tabs are uncontrolled and start on Overview, with arrow keys moving between them.
Preview
Installation
FAQ
How are the tabs built?
With Tabs, TabsList, TabsTrigger and TabsContent, mapped from a static array of three tabs. Overview is the default tab.
TabsList uses variant="line", and each trigger and panel share a value.
How do people move between tabs with the keyboard?
Tab moves focus onto the selected tab, and the arrow keys move between tabs. Tab again moves into the panel.
How do I open the sheet on a given tab?
Control the tabs: keep the value in state, set it before you open the sheet, and update it on change.
Pass value and onValueChange.
What's in each tab?
One paragraph of muted text per tab. Replace it with the real panel: a member list, an activity feed, a settings form.
Related
- Sheet with Header, Content, and FooterA right-side sheet in three parts: a
- User Profile View SheetA right-side sheet showing a user's
- Basic TabsFour horizontal tabs that switch between
- Sheet with Scrollable ContentA right-side sheet whose list of 20 items
- Standard DialogA share dialog with a read-only link, a
- Tab-Style Accordion with Left Plus TriggerAn accordion of integration questions