# Tear-off Tabs

> Tabs you drag to reorder, or pull down until one pops free and grows into a floating window. Carry a window back over the bar and it shrinks into a tab while a gap opens where it lands.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Components › Navigation |
| Live preview | https://uibrik.com/components/tear-off-tabs |
| Writes | 1 file into `components/uibrik/tear-off-tabs/` |
| Packages | `@tabler/icons-react`, `motion` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 30, 2026 |

## Add it

```bash
npx shadcn@latest add https://uibrik.com/r/tear-off-tabs.json
```

With the `@uibrik` namespace in `components.json` ([setup](https://uibrik.com/docs/installation.md)): `npx shadcn@latest add @uibrik/tear-off-tabs`.

Can't run commands? https://uibrik.com/components/tear-off-tabs/prompt.txt has every file verbatim, with the setup steps, ready for an assistant to write.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { TearOffTabs } from "@/components/uibrik/tear-off-tabs/tear-off-tabs";

const tabs = [
  {
    id: "notes",
    title: "Notes",
    icon: <IconFileTextFilled />,
    content: <Page title="Notes" rows={[["Launch plan", "Edited 2m ago"], ["Hiring loop", "Yesterday"], ["Q1 goals", "Mon"], ["Pricing ideas", "Nov 28"]]} />,
  },
  {
    id: "tasks",
    title: "Tasks",
    icon: <IconSquareCheckFilled />,
    content: <Page title="Tasks" rows={[["Ship onboarding flow", "Today"], ["Review billing copy", "Tomorrow"], ["Fix Safari tooltip", "Done"], ["Plan retro", "Fri"]]} />,
  },
  // …2 more
];

<TearOffTabs
  height={360}
  threshold={36}
  tabs={tabs}
  windowSize={{ width: 300, height: 210 }}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/tear-off-tabs.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `height` | `number` | `360` | Height of the page area. |
| `threshold` | `number` | `36` | How far a tab is pulled down before it tears free. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `tabs` | `{ id; title; icon?; content }[]` |  | The pages. A torn-off page shows in its window at windowSize. |
| `windowSize` | `{ width; height }` | `{ width: 300, height: 210 }` | Size of a torn-off window, px. |
| `className` | `string` |  | Classes for the frame. |

## Where it fits

- **Editors and IDEs**: Pull a file or panel out to see it beside another, then dock it back. Pairs with [Split Panes](https://uibrik.com/components/split-panes.md).
- **Dashboards with many views**: Keep a chart or chat floating while you work in another tab.
- **Browser-like apps**: Reorder and detach pages the way people already do in their browser.

## Same shelf: Navigation

- [Tick Nav](https://uibrik.com/components/tick-nav.md): A section list on a ruler whose ticks swell like a dock under the pointer, sliding each label out with its tick.
- [Viscosity Menu](https://uibrik.com/components/viscosity-menu.md) (Pro): A dot that pours into a menu panel like a drop of liquid.
- [Animated Tabs](https://uibrik.com/components/animated-tabs.md) (Pro): Tabs whose underline or pill springs between tabs, with a highlight that follows the pointer, panels that slide in from the direction you moved and a panel area that eases to each panel's height.
- [Collapsing Breadcrumb](https://uibrik.com/components/collapsing-breadcrumb.md): A breadcrumb that folds its middle crumbs into an ellipsis when space runs out and unfolds them in place on hover or tap, each crumb sliding open to its own width.
- [Fold Toolbar](https://uibrik.com/components/fold-toolbar.md): An icon button that unfolds into a tray of tools, pushing its neighbours aside, and folds back into whichever tool you pick.
- [Hamburger Sheet](https://uibrik.com/components/hamburger-sheet.md): A menu button that grows into its own sheet: the shape unfolds from the button's corner while the three lines cross into the close mark.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/tear-off-tabs/` so the import paths keep resolving.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
