Pro
Folder tabs
Tabs as folders in a drawer. The chosen folder comes to the front and the rest sit behind it with their tabs showing, so you can see how many there are and where you are. Distance back is the number of steps from the open tab.
pnpm dlx shadcn@latest add @caliper/folder-tabsWhen to use
Use it for
- A handful of related sections such as settings, where place in the set is worth showing.
- Tabs that should feel like one object rather than a toolbar.
Skip it when
- More than about eight sections; use the tabs or a sidebar.
- Tabs that need to scroll sideways.
Decisions
Why it is built this way, so you know what to keep when you change your copy.
Behaviour
- A real tablist
- Arrows, Home and End move and select. Each panel is labelled by its tab and the other folders are hidden and inert.
Styling
- Tabs never move sideways
- The row of labels stays put; only the folders change place, so you do not have to find a tab again after pressing it.
Usage
- The stack is as tall as the tallest panel
- Switching never makes the page jump. Long tab names are cut with an ellipsis and keep their full name as a title.
Installation
pnpm dlx shadcn@latest add @caliper/folder-tabs
Adds its 5 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage
Import it from your copy of the source. The example behind the preview comes with the source.
import { FolderTabs } from "@/components/ui/folder-tabs"
The worked example comes with Pro
The 46-line example behind the preview opens here, ready to copy.
- 626 Pro parts, blocks and page templates, all with source
- $149 once, with lifetime updates. No renewal
- A full refund within 14 days if it is not for you
API reference
FolderTabs
component
Accessibility
It exposes tablist, tab and tabpanel semantics, with aria-label, aria-owns, aria-selected, aria-controls and aria-labelledby kept in step with state.
Motion
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.