---
agent:
  instructions: "Search goop.so for Goop's components, templates, design skill, docs, pricing and terms. Ask in keywords or a plain question, such as \"date picker props\" or \"is the design skill free\"; the answer is the matching page sections in Markdown, each with its address."
  endpoint: "https://goop.so/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Resizable panel group

Panes a person resizes by dragging the handle between them, or with its keys, for React and Tailwind CSS. Part of Goop Pro.

Pro. Its export: `ResizablePanelGroup`.

## Try it

Drag the handle between the issues and the open issue, or Tab to it and use the arrow keys, Home and End; Enter shuts the list and opens it again.

The issues are our own sample rows; the sizes are kept only on this page.

## When to use

- Panes a person resizes by dragging the handle between them, or with its keys.
- Also called: split pane or resizable panels.

## Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Resizable panel group on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

```sh
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-resizable.json --yes
```

```text
Add the Goop Resizable panel group to this project. The install steps are at https://goop.so/docs/install.md
```

## Usage

```tsx
import { ResizablePanelGroup, ResizablePanel, ResizableHandle } from '@/components/ui/goop/resizable';

<div className="h-96">
  <ResizablePanelGroup orientation="horizontal">
    <ResizablePanel defaultSize={35} minSize="200px" maxSize={60} collapsible>
      …
    </ResizablePanel>
    <ResizableHandle aria-label="Resize the list" />
    <ResizablePanel minSize="240px">
      …
    </ResizablePanel>
  </ResizablePanelGroup>
</div>
```

- Fits: inbox, list: aside (body: long).
- Also known as: Splitter, SplitPane, SplitView, ResizablePanels, PanelGroup.
- A pane's content is yours (`overflow-auto` to scroll it). In the app frame, set the group in the panel's body; a record opened beside a list is RecordPeek, which brings its own handle.
- height, width, background, motion: add no class for these.

## API reference

### Options

- `orientation?: 'horizontal' | 'vertical' = 'horizontal'` — `horizontal`: panes side by side, the handle a vertical strip; `vertical`: panes stacked.
- `onLayout?: (sizes: number[]) => void` — Called with each pane's size in percent, in order, whenever the sizes change.

- Types: ResizableSize = number | `${ number }px`

### Parts

- `ResizablePanel` — One pane of the group; defaultSize?: ResizableSize — The size it starts at; left out, a share of what is left; minSize?: ResizableSize — Its least size; nothing by default; maxSize?: ResizableSize — Its greatest size; the whole group by default; collapsible?: boolean — It snaps shut past half its least size, and opens the same way or with Enter on the handle; collapsedSize?: ResizableSize — Its size shut; nothing by default
- `ResizableHandle` — The handle between two panes; line?: 'hover' | 'always' = 'hover' — `hover`: the line shows under the pointer only; `always`: at rest too

- data-slot values (to select a part by): resizable-handle, resizable-handle-line, resizable-panel, resizable-panel-group

## Keyboard

- Tab: move to the handle, then on
- ArrowLeft / ArrowRight: move the edge of side-by-side panes 16 px (with Shift 64 px), right to left mirrored
- ArrowUp / ArrowDown: move the edge of stacked panes 16 px (with Shift 64 px)
- Home / End: put the pane before the handle at its least or its greatest size
- Enter: shut or open again a collapsible pane beside the handle
- Escape: while dragging, put the edge back where the drag began

## Accessibility

- The part itself answers the keys above.
- hover, active: the browser's own (:hover, :active): write nothing
- focus-visible: the attribute data-focus-visible
- dragging: the attribute data-dragging

## Motion

- The part sets its own motion: add no transition or animation of your own.

## Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

## Related

- [Scroll area](/themes/trail/components/scroll-area): A region of content that scrolls behind thin bars that float over its edge.
- [Footer](/themes/trail/components/footer): The closing band of a marketing or a docs page, with its groups of links, legal text and small print.
- [Toolbar](/themes/trail/components/toolbar): A row of controls over a list, such as a period select and its filter and view buttons.
- [Section header](/themes/trail/components/section-header): The title row over one block inside a page, with an optional count, description and actions, such as a settings section.
