# TabBar

> A pane's first row — its tabs, then only + and Maximize (Restore while maximized), with All tabs while the tabs don't fit; it fits the tabs by one width rule.

Source: https://raft-design.botiverse.build/components/tab-bar. Generated from the current release; where it differs from what you remember, this page is right.

TabBar is a pane's first row: its [Tab](https://raft-design.botiverse.build/components/tab.md)s, then at its end only + and Maximize (pressed, as Restore, while maximized), with All tabs before them while the tabs don't fit. It fits its tabs by one width rule, and has no ⋯: what is done to a tab or its pane is in the tab's menu ([Tabs and panes](https://raft-design.botiverse.build/patterns/tabs-and-panes.md#the-tab-bar)).

```tsx
import { useCallback, useState } from "react";
import { FileText, Globe, LayoutDashboard } from "lucide-react";
import { Tab, TabBar } from "@botiverse/raft-ui/wip";
import { TabMenuItems } from "../../tab/tab-menu.tsx";
import { useExampleTabs } from "../../tab/use-example-tabs.ts";

const TABS = ["notes", "vite", "board"];

/**
 * A pane's tab bar: its tabs with their names in full, then + and Maximize.
 * Maximize is pressed, as Restore, while maximized, and a double click on the bar's
 * empty part does the same.
 */
export function TabBarPreviewContent() {
  const tabs = useExampleTabs(TABS, "notes");
  const [maximized, setMaximized] = useState(false);
  const toggleMaximized = useCallback(() => setMaximized((current) => !current), []);
  return (
    <div className="w-full max-w-3xl overflow-hidden rounded-container border border-line-hairline">
      <TabBar
        label="Tabs"
        value={tabs.front}
        onValueChange={tabs.setFront}
        onNewTab={tabs.newTab}
        maximized={maximized}
        onToggleMaximize={toggleMaximized}
        onEmptyDoubleClick={toggleMaximized}
      >
        {tabs.isOpen("notes") ? (
          <Tab
            value="notes"
            source="object"
            icon={<FileText />}
            title="Launch notes"
            onClose={tabs.close}
            menu={
              <TabMenuItems value="notes" onClose={tabs.close} onCloseOthers={tabs.closeOthers} />
            }
          />
        ) : null}
        {tabs.isOpen("vite") ? (
          <Tab
            value="vite"
            source="site"
            icon={<Globe />}
            title="vite.dev"
            pageTitle="Getting started"
            onClose={tabs.close}
            menu={
              <TabMenuItems value="vite" onClose={tabs.close} onCloseOthers={tabs.closeOthers} />
            }
          />
        ) : null}
        {tabs.isOpen("board") ? (
          <Tab
            value="board"
            source="app"
            icon={<LayoutDashboard />}
            title="Board"
            onClose={tabs.close}
            menu={
              <TabMenuItems value="board" onClose={tabs.close} onCloseOthers={tabs.closeOthers} />
            }
          />
        ) : null}
        {tabs.added.map((value) => (
          <Tab
            key={value}
            value={value}
            source="object"
            icon={<FileText />}
            title="New tab"
            onClose={tabs.close}
          />
        ))}
      </TabBar>
    </div>
  );
}
```

## When to use

| Situation                                | Use                            |
| ---------------------------------------- | ------------------------------ |
| The tabs of a pane beside a conversation | TabBar                         |
| The sections of one page                 | [Tabs](https://raft-design.botiverse.build/components/tabs.md)        |
| A row of buttons for the front object    | [PaneToolRow](https://raft-design.botiverse.build/components/pane.md) |

## Anatomy

- The tab area: `Tabs` › `TabsList`, named by `label`, holding the `children` (the pane's tabs, pinned ones first; the workspace tabs pin none for now, [Tabs and panes](https://raft-design.botiverse.build/patterns/tabs-and-panes.md#one-kind-of-tab)), then a divider and the `merged` tabs in a narrow window, or a divider and the `squeezed` tabs while the pane is maximized ([Merged and squeezed tabs](#merged-and-squeezed-tabs)). The tab whose `value` is the bar's `value` is in front; the bar's `density` reaches every tab.
- All tabs: a ghost Button opening a [DropdownMenu](https://raft-design.botiverse.build/components/dropdown-menu.md) of every tab in `children`, then a divider and every tab in `merged`, then a divider and every tab in `squeezed`, the front one checked. Only while the tabs don't fit.
- The + button (`onNewTab`) and Maximize (`onToggleMaximize`): [PanelAction](https://raft-design.botiverse.build/components/panel.md)s with tooltips. Maximize is a `PanelToggleAction`: pressed while `maximized`, with `minimize-2` and the name Restore, as a panel's Expand and its Restore are.
- The insertion line, while a tab is dropped into the bar: among its own tabs (`insertAt`) or its merged ones (`mergedInsertAt`).

## Width

One rule, the same for every tab, in front or not, its own or merged, so choosing or hovering a tab never changes a width ([Tabs and panes](https://raft-design.botiverse.build/patterns/tabs-and-panes.md#width)):

1. Names in full first.
2. When they don't fit, the longest give way first: the water level falls and short names stay whole. Every tab is at most 200px (120px title only) and goes down to 80px (48px title only).
3. Only when every tab is at its least width and they still don't fit does All tabs appear. Its room is kept first, then the pinned tabs are placed, then the tabs in order, each at a readable width (up to 120px, 72px title only); the rest move into the list whole, never half shown.
4. The front tab is never in the list. When it would be, it takes the place of the last tabs kept, at the width any tab has there, never one of its own: choosing a tab from All tabs brings it into the bar that way. A bar too short even for that gives it the room left beside All tabs, never under 56px. One tab never moves into the list: it is cut.

```tsx
import { FileText, Globe, LayoutDashboard } from "lucide-react";
import { TaskStatusIcon } from "@botiverse/raft-ui";
import { Tab, TabBar } from "@botiverse/raft-ui/wip";
import { TabMenuItems } from "../../tab/tab-menu.tsx";
import { useExampleTabs } from "../../tab/use-example-tabs.ts";

const TABS = ["notes", "vite", "task-7", "board", "layout", "task-8"];

/**
 * Six tabs in a bar that can be resized from its corner. The names are in
 * full while they fit; then the longest give way first; once every tab is at
 * its least width, All tabs appears and the tabs that don't fit move into it
 * whole. Every tab follows the same rule, so choosing one changes no width.
 * A hidden tab with new replies puts a dot on the button.
 */
export function TabBarFitContent() {
  const tabs = useExampleTabs(TABS, "notes");
  return (
    <div className="w-[420px] max-w-full min-w-60 resize-x overflow-hidden rounded-container border border-line-hairline">
      <TabBar
        label="Tabs"
        value={tabs.front}
        onValueChange={tabs.setFront}
        onNewTab={tabs.newTab}
        maximized={tabs.maximized}
        onToggleMaximize={tabs.toggleMaximized}
      >
        {tabs.isOpen("notes") ? (
          <Tab
            value="notes"
            source="object"
            icon={<FileText />}
            title="Launch notes"
            onClose={tabs.close}
            menu={
              <TabMenuItems value="notes" onClose={tabs.close} onCloseOthers={tabs.closeOthers} />
            }
          />
        ) : null}
        {tabs.isOpen("vite") ? (
          <Tab
            value="vite"
            source="site"
            icon={<Globe />}
            pageTitle="Getting started"
            title="vite.dev"
            onClose={tabs.close}
            menu={
              <TabMenuItems value="vite" onClose={tabs.close} onCloseOthers={tabs.closeOthers} />
            }
          />
        ) : null}
        {tabs.isOpen("task-7") ? (
          <Tab
            value="task-7"
            source="object"
            icon={<TaskStatusIcon status="in-progress" />}
            prefix="#launch-week:#7"
            title="Moving a tab never reloads it"
            onClose={tabs.close}
            menu={
              <TabMenuItems value="task-7" onClose={tabs.close} onCloseOthers={tabs.closeOthers} />
            }
          />
        ) : null}
        {tabs.isOpen("board") ? (
          <Tab
            value="board"
            source="app"
            icon={<LayoutDashboard />}
            title="Board"
            onClose={tabs.close}
            menu={
              <TabMenuItems value="board" onClose={tabs.close} onCloseOthers={tabs.closeOthers} />
            }
          />
        ) : null}
        {tabs.isOpen("layout") ? (
          <Tab
            value="layout"
            source="object"
            icon={<FileText />}
            title="layout-notes.md"
            onClose={tabs.close}
            menu={
              <TabMenuItems value="layout" onClose={tabs.close} onCloseOthers={tabs.closeOthers} />
            }
          />
        ) : null}
        {tabs.isOpen("task-8") ? (
          <Tab
            value="task-8"
            source="object"
            icon={<TaskStatusIcon status="todo" />}
            prefix="#launch-week:#8"
            unread={tabs.front === "task-8" ? undefined : 2}
            title="Panes fold into tabs on a narrow screen"
            onClose={tabs.close}
            menu={
              <TabMenuItems value="task-8" onClose={tabs.close} onCloseOthers={tabs.closeOthers} />
            }
          />
        ) : null}
        {tabs.added.map((value) => (
          <Tab
            key={value}
            value={value}
            source="object"
            icon={<FileText />}
            title="New tab"
            onClose={tabs.close}
          />
        ))}
      </TabBar>
    </div>
  );
}
```

The rule is `fitTabs`, a pure function the bar runs on what it measures, so it is tested without a browser. It reads only the tabs' names and the bar's width; which tab is in front only keeps that tab out of the list. Each tab keeps the ×'s room whether its × shows or not (a background tab's shows on hover in it), and the front tab keeps the others' weight, so nothing about a tab changes its width when it comes to the front. The bar measures every tab whole, unshrunk and uncapped, so the measurement never depends on the last fit's output. Once All tabs shows, it goes only when the tabs fit with 6px to spare, so a bar whose width sits on the boundary can't flip it on every layout. Should a layout ever chase its own output, All tabs showing and hiding more than 6 times within a second holds it, with the tabs laid out for it, for the rest of that second, and the bar warns once in the console. Web fonts loading fit the tabs again.

## All tabs

- It lists every tab of the pane with its icon and name, the front one checked, then, after a divider, the merged tabs, and after another, the squeezed tabs. Choosing one brings it to the front, back into the bar (a squeezed one goes to `onValueChange`, for the app to restore with). Its heading counts the pane's own tabs; its name counts every tab it lists.
- A hidden tab with something new puts one attention dot on the button, and its own count or dot on its item.
- In a `compact` bar (`density="compact"`, a pane under 280px) every tab shows its title alone, the front one too, and the button shows the count and its chevron, never a bare chevron. Its name stays its tooltip and accessible name.

```tsx
import { FileText, Globe, LayoutDashboard } from "lucide-react";
import { TaskStatusIcon } from "@botiverse/raft-ui";
import { Tab, TabBar } from "@botiverse/raft-ui/wip";
import { TabMenuItems } from "../../tab/tab-menu.tsx";
import { useExampleTabs } from "../../tab/use-example-tabs.ts";

const TABS = ["notes", "vite", "task-7", "board", "layout", "task-8"];

/**
 * A pane under 280px with six tabs: every tab keeps its title alone, the
 * front one too, and All tabs shows only the count and its chevron. Its name stays
 * in its tooltip and is what a screen reader hears.
 */
export function TabBarNarrowContent() {
  const tabs = useExampleTabs(TABS, "notes");
  return (
    <div className="w-[250px] max-w-full overflow-hidden rounded-container border border-line-hairline">
      <TabBar
        label="Tabs"
        value={tabs.front}
        onValueChange={tabs.setFront}
        density="compact"
        onNewTab={tabs.newTab}
        maximized={tabs.maximized}
        onToggleMaximize={tabs.toggleMaximized}
      >
        {tabs.isOpen("notes") ? (
          <Tab
            value="notes"
            source="object"
            icon={<FileText />}
            title="Launch notes"
            onClose={tabs.close}
            menu={
              <TabMenuItems value="notes" onClose={tabs.close} onCloseOthers={tabs.closeOthers} />
            }
          />
        ) : null}
        {tabs.isOpen("vite") ? (
          <Tab
            value="vite"
            source="site"
            icon={<Globe />}
            title="vite.dev"
            pageTitle="Getting started"
            onClose={tabs.close}
            menu={
              <TabMenuItems value="vite" onClose={tabs.close} onCloseOthers={tabs.closeOthers} />
            }
          />
        ) : null}
        {tabs.isOpen("task-7") ? (
          <Tab
            value="task-7"
            source="object"
            icon={<TaskStatusIcon status="in-progress" />}
            prefix="#launch-week:#7"
            title="Moving a tab never reloads it"
            onClose={tabs.close}
            menu={
              <TabMenuItems value="task-7" onClose={tabs.close} onCloseOthers={tabs.closeOthers} />
            }
          />
        ) : null}
        {tabs.isOpen("board") ? (
          <Tab
            value="board"
            source="app"
            icon={<LayoutDashboard />}
            title="Board"
            onClose={tabs.close}
            menu={
              <TabMenuItems value="board" onClose={tabs.close} onCloseOthers={tabs.closeOthers} />
            }
          />
        ) : null}
        {tabs.isOpen("layout") ? (
          <Tab
            value="layout"
            source="object"
            icon={<FileText />}
            title="layout-notes.md"
            onClose={tabs.close}
            menu={
              <TabMenuItems value="layout" onClose={tabs.close} onCloseOthers={tabs.closeOthers} />
            }
          />
        ) : null}
        {tabs.isOpen("task-8") ? (
          <Tab
            value="task-8"
            source="object"
            icon={<TaskStatusIcon status="todo" />}
            prefix="#launch-week:#8"
            unread={tabs.front === "task-8" ? undefined : 2}
            title="Panes fold into tabs on a narrow screen"
            onClose={tabs.close}
            menu={
              <TabMenuItems value="task-8" onClose={tabs.close} onCloseOthers={tabs.closeOthers} />
            }
          />
        ) : null}
        {tabs.added.map((value) => (
          <Tab
            key={value}
            value={value}
            source="object"
            icon={<FileText />}
            title="New tab"
            onClose={tabs.close}
          />
        ))}
      </TabBar>
    </div>
  );
}
```

## Merged and squeezed tabs

Other panes' tabs join a bar after a divider in two cases, and each has its own slot, since the tabs behave differently in each.

- **Merged** (`merged`): at a narrow window's last step the rightmost column's tabs join its left neighbour's top bar ([Tabs and panes](https://raft-design.botiverse.build/patterns/tabs-and-panes.md#squeezed-panes-keep-their-titles)). They are the bar's tabs as much as its own are, plain `Tab`s with nothing extra: the same width rule, in the same fit, after its own; those that don't fit go into All tabs, after the same divider there. Any of them can be the bar's `value`, and each has its ×, middle click, Delete, its menu and its drag, as its own tabs have. The divider shows only between tabs: when every merged tab, or every own one, is in All tabs, it goes too. A drop among them is a drop into their own pane, so it has an index of its own: `mergedInsertAt` draws the line among the merged tabs, as `insertAt` does among the bar's own.

```tsx
import { useCallback, useState } from "react";
import { FileText, Presentation } from "lucide-react";
import { Tab, TabBar } from "@botiverse/raft-ui/wip";
import { TabMenuItems } from "../../tab/tab-menu.tsx";

const OWN = ["plan"];
const MERGED = ["q3", "notes"];

/**
 * A narrow window's last step: the right column's tabs have joined this
 * 200px pane's bar, after a divider. They are its tabs as much as its own
 * is: the same width rule, so every title keeps its least width, and,
 * narrowed from the corner, those that don't fit go into All tabs, after the
 * same divider there. Any of them can come to the front, and each has its ×
 * and its menu.
 */
export function TabBarMergedContent() {
  const [open, setOpen] = useState(() => [...OWN, ...MERGED]);
  const [front, setFront] = useState("plan");
  const close = useCallback(
    (value: string) => {
      const rest = open.filter((item) => item !== value);
      // Closing the last tab opens them all again, so the example never empties.
      setOpen(rest.length ? rest : [...OWN, ...MERGED]);
      if (!rest.length) setFront("plan");
      else if (front === value) setFront(rest[0]!);
    },
    [open, front],
  );
  const isOpen = (value: string) => open.includes(value);
  return (
    <div className="w-[200px] max-w-full min-w-32 resize-x overflow-hidden rounded-container border border-line-hairline">
      <TabBar
        label="Tabs"
        value={front}
        onValueChange={setFront}
        density="compact"
        merged={
          MERGED.some(isOpen) ? (
            <>
              {isOpen("q3") ? (
                <Tab
                  value="q3"
                  source="object"
                  icon={<Presentation />}
                  title="Q3 review"
                  onClose={close}
                  menu={<TabMenuItems value="q3" onClose={close} />}
                />
              ) : null}
              {isOpen("notes") ? (
                <Tab
                  value="notes"
                  source="object"
                  icon={<FileText />}
                  title="Design notes"
                  onClose={close}
                  menu={<TabMenuItems value="notes" onClose={close} />}
                />
              ) : null}
            </>
          ) : undefined
        }
      >
        {isOpen("plan") ? (
          <Tab
            value="plan"
            source="object"
            icon={<FileText />}
            title="Launch plan"
            onClose={close}
            menu={<TabMenuItems value="plan" onClose={close} />}
          />
        ) : null}
      </TabBar>
    </div>
  );
}
```

- **Squeezed** (`squeezed`, each `Tab` with `squeezed`): while this pane is maximized, every other pane's tabs, dimmed. The pane's own tabs are fitted first, exactly as in a bar with none, and the squeezed tabs get only the room they leave, never the reverse: the maximized pane is what the person works in. In that room the same width rule holds (names in full, the longest giving way first) down to 56px, the floor every tab has; then the last ones move into All tabs, whole, listed after a divider below the bar's own and merged tabs, and the divider in the bar goes with the last of them. All tabs' room comes off the bar before the own tabs are fitted again: that button's width, beside the squeezed tabs' divider, is all the own tabs ever give up for them. As for the own tabs, once All tabs shows it goes only when the squeezed tabs fit with 6px to spare. They never come to the front and have no ×; a tab's `menu` still opens on a right-click, so any tab has its menu. Choosing one, in the bar or in All tabs, comes to `onValueChange`, for the app to restore the layout with and show it in its own pane.
- Maximize shows while `onToggleMaximize` is given; while `maximized` it is pressed and named Restore, an icon like Maximize, never a labelled button. `onEmptyDoubleClick` runs on a double click on the bar's empty part.

```tsx
import { useCallback, useState } from "react";
import { FileText, Globe, ListTodo } from "lucide-react";
import { Tab, TabBar } from "@botiverse/raft-ui/wip";
import { TabMenuItems } from "../../tab/tab-menu.tsx";
import { useExampleTabs } from "../../tab/use-example-tabs.ts";

const TABS = ["notes", "vite"];

/**
 * A maximized pane: Maximize pressed, as Restore, and the other panes' tabs
 * dimmed after a divider, each with its menu but no ×. Choosing one of them
 * restores the layout (its own pane shows it), and the other panes' tabs
 * leave this bar.
 */
export function TabBarMaximizedContent() {
  const tabs = useExampleTabs(TABS, "notes");
  const [maximized, setMaximized] = useState(true);
  const toggleMaximized = useCallback(() => setMaximized((current) => !current), []);
  const show = useCallback(
    (value: string) => {
      // Another pane's tab: the layout comes back and that pane shows it; this bar keeps its own front tab.
      if (value.startsWith("other:")) setMaximized(false);
      else tabs.setFront(value);
    },
    [tabs],
  );
  return (
    <div className="w-full max-w-3xl overflow-hidden rounded-container border border-line-hairline">
      <TabBar
        label="Tabs"
        value={tabs.front}
        onValueChange={show}
        onNewTab={tabs.newTab}
        maximized={maximized}
        onToggleMaximize={toggleMaximized}
        squeezed={
          maximized ? (
            <>
              <Tab
                value="other:tasks"
                source="object"
                icon={<ListTodo />}
                title="Tasks"
                squeezed
                menu={<TabMenuItems maximized onToggleMaximize={toggleMaximized} />}
              />
              <Tab
                value="other:docs"
                source="site"
                icon={<Globe />}
                title="docs.example.com"
                pageTitle="Example Docs"
                squeezed
                menu={<TabMenuItems maximized onToggleMaximize={toggleMaximized} />}
              />
            </>
          ) : undefined
        }
      >
        {tabs.isOpen("notes") ? (
          <Tab
            value="notes"
            source="object"
            icon={<FileText />}
            title="Launch notes"
            onClose={tabs.close}
            menu={
              <TabMenuItems value="notes" onClose={tabs.close} onCloseOthers={tabs.closeOthers} />
            }
          />
        ) : null}
        {tabs.isOpen("vite") ? (
          <Tab
            value="vite"
            source="site"
            icon={<Globe />}
            title="vite.dev"
            pageTitle="Getting started"
            onClose={tabs.close}
            menu={
              <TabMenuItems value="vite" onClose={tabs.close} onCloseOthers={tabs.closeOthers} />
            }
          />
        ) : null}
        {tabs.added.map((value) => (
          <Tab
            key={value}
            value={value}
            source="object"
            icon={<FileText />}
            title="New tab"
            onClose={tabs.close}
          />
        ))}
      </TabBar>
    </div>
  );
}
```

## Content

- Name the tablist after its pane, or "Tabs". Pass translations as `messages`; tooltips can carry the app's shortcut, such as "New tab (⌘T)".
- All tabs reads each tab's own props: its `value`, its `prefix` and `title` as its name (a task's reference and title, an App's name), or a web page's `pageTitle` (its `title`, the domain, while it has none), its `icon`, `unread` and `unreadDot`. A component wrapping `Tab` passes these on as its own props, so All tabs follows them as they change; a Tab whose wrapper doesn't is still listed, from what the Tab says itself.

## Accessibility

- The tabs are one tablist, one Tab stop: the arrow keys move between them in order, its own then the merged or squeezed ones, past the divider ([Tab](https://raft-design.botiverse.build/components/tab.md#accessibility)). Tab then reaches All tabs, +, and Maximize or Restore.
- The + button is named New tab, ⤢ Maximize, and ⤡ Restore while pressed (its tooltip says so too). All tabs is named with its count, and says when a hidden tab has something new: "All tabs (6), new in hidden tabs".
- The bar's dividers and the insertion line are hidden from assistive technology; in All tabs the divider is the menu's separator.
- The bar registers no shortcuts: ⌘T, ⌘W, ⌃Tab, ⌘↩ and Escape are the app's, through `onNewTab`, `onToggleMaximize` and the tabs' `onClose`.

## Rules

- Keep the bar's end to +, Maximize and, only when needed, All tabs. Never a ⋯.
- Fit the tabs by the width rule only; never cap the number of tabs or close one for the person.
- Show All tabs only when every tab is at its least width and they still don't fit, or, while maximized, when the squeezed tabs don't fit at 56px in the room the pane's own tabs leave.
- Never narrow a maximized pane's own tabs for its squeezed ones beyond All tabs' room and the divider's.

## API

### TabBar

A pane's first row: its tabs (`Tabs` › `TabsList`), then at its end only + and Maximize (pressed, as Restore, while maximized), with All tabs before them while the tabs don't fit. What is done to a tab or its pane is in the tab's own menu; the bar has no ⋯.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` (required) | `ReactNode` |  | The pane's `Tab`s, pinned ones first. All tabs lists them from their props (`value`, `prefix` and `title`, `icon`, `unread`, `unreadDot`), or, for a Tab inside a wrapper that doesn't pass them on, from the Tab itself. |
| `density` | `"compact" \| "regular"` | `"regular"` | `compact`, for a pane under 280px: every tab shows its title alone, in front or not (no icon; its × laid over the title's end, the front tab's always, another's on hover), and All tabs its count and chevron (its name stays its tooltip and accessible name). |
| `insertAt` | `number` | `null` | A tab is being dropped into this bar before the tab at this index of its `children` (their count puts it at the end of them, before the divider): a line in the gap the tabs open. `null` for no drop here. |
| `label` (required) | `string` |  | The tab list's accessible name: the pane's name, or "Tabs". |
| `maximized` | `boolean` | `false` |  |
| `merged` | `ReactNode` |  | The `Tab`s of the column merged into this pane in a narrow window, after a divider. They are the bar's tabs as much as its `children` are: the same width rule and fit, All tabs (after the same divider), any of them the bar's `value`, each with its ×, menu and drag. |
| `mergedInsertAt` | `number` | `null` | The same for the `merged` tabs: a drop into the merged column, before its tab at this index (their count puts it at the end). An index of its own, as the merged tabs are another pane's. `insertAt` wins if both are given. |
| `messages` | `Partial<TabBarMessages>` |  |  |
| `onEmptyDoubleClick` | `() => void` |  | A double click on the bar's empty part: maximize or restore. |
| `onNewTab` | `() => void` |  | The + button: a new tab. Without it there is no +. |
| `onToggleMaximize` | `() => void` |  | The Maximize button, and Restore while maximized. Without it neither shows. |
| `onValueChange` (required) | `(value: string) => void` |  |  |
| `squeezed` | `ReactNode` |  | Every other pane's tabs while this one is maximized, after a divider (`Tab` with `squeezed`): dimmed, never in front, given only the room the bar's own tabs leave (they give way first, then move into All tabs, after a divider). Choosing one comes to `onValueChange`, for the app to restore the layout with. |
| `value` (required) | `string` |  | The front tab's value: the `Tab` with this value is in front. |

Also takes the attributes of its element.
