Skip to content
caliper ui docs

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.

Pro
pnpm dlx shadcn@latest add @caliper/folder-tabs

Northwind workspace

Team plan, 12 seats, renews on November 1

Overview

Workspace at a glance

  • Seats12 of 15
  • PlanTeam
  • RegionEU (Frankfurt)

Billing

Next invoice and payment method

  • Next invoiceNov 01 · $199.00
  • CardVisa ending 4821
  • Tax IDAdded

Members

Who can sign in

  • Owners2
  • Admins3
  • Pending invites4

Audit

Everything that changed

  • Last 24 hours18 events
  • Last exportOct 12
  • Retention1 year
Installs components/ui/folder-tabs.tsxDepends on @radix-ui/react-slot, lucide-reactMotion none in component source

When 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

terminal
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.

example.tsx
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
Checking your licence…

API reference

FolderTabs

component
PropTypeDefaultDescription
tabs *readonly FolderTab[]—
label *string—Accessible name of the tab list.
valuestring—The open tab. Controlled when set; the first tab is open by default.
defaultValuestring—
onValueChange((id: string) => void)—
statusDepthStatus"ready"
messagesDepthMessages—
onRetry(() => void)—
disabledboolean—
classNamestring—

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.

KeyBehaviour
→Moves to the next item or value.
←Moves to the previous item or value.
HomeJumps to the first item or the minimum.
EndJumps to the last item or the maximum.

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.

All Surfaces examples