Black Friday: 30% off Pro

Get 30% off

Updated

Tear-off Tabs

New

Preview

Customize

Height360px
Threshold36px

Installation

npx shadcn@latest add https://uibrik.com/r/tear-off-tabs.json
Adds the files to components/uibrik/tear-off-tabs and installs @tabler/icons-react and motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/tear-off-tabs.

Usage

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 }}/>

Where to use Tear-off Tabs

  • Editors and IDEs

    Pull a file or panel out to see it beside another, then dock it back.

    Pairs with Split Panes

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

Props

TearOffTabs
height
Type number
360
Height of the page area.
threshold
Type number
36
How far a tab is pulled down before it tears free.
tabs
Type { id; title; icon?; content }[]
–
The pages. A torn-off page shows in its window at windowSize.
windowSize
Type { width; height }
{ width: 300, height: 210 }
Size of a torn-off window, px.
className
Type string
–
Classes for the frame.