shadcn.io is not affiliated with official shadcn/ui
Tabs examples · Layout
Vertical Tabs for React
Settings tabs stacked in a column beside their panel, like a sidebar.
Many sections fit better in a column than in a row. With orientation="vertical", Tabs lays the list beside the panel, and the triggers stack and align to the start. Use it for settings pages where the list works like a sidebar.
Preview
Installation
FAQ
How does this demo put the triggers in a column?
orientation="vertical" on Tabs. The tabs then sit in a row with the panel, the list stacks its triggers, and each trigger fills the list's width with its label at the start.
Do Up and Down move between these triggers?
Yes. The orientation is vertical, so Up and Down move between triggers, and Home and End jump to the first and last.
The arrow keys only move focus, and Enter or Space selects. Set activateOnFocus on TabsList to select on focus.
Which sections are in the list?
Profile, Security, Preferences and Team, built from a sections array. Profile is the default, and each panel is a bordered bg-card block with an h3 and a muted paragraph.
Related
- Full Width TabsThree tabs that split the full width of
- Scrollable TabsTwelve month tabs in a scroll area, so
- Basic TabsFour horizontal tabs that switch between
- Standard Accordion with ChevronA bordered accordion of three questions
- Standard CardA basic card with a title, a description
- Controlled TabsThree step tabs held in state, with