npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-resizable.json --yesResizable panel group
ProPanes a person resizes by dragging the handle between them, or with its keys, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
- ResizablePanelOne pane of the group
- ResizableHandleThe handle between two panes
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>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.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-resizable.json --yesAdd the Goop Resizable panel group to this project. The install steps are at https://goop.so/docs/install.mdUsage
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-autoto 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
| Option | Type | What it does |
|---|---|---|
| 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
| Part | What it is |
|---|---|
| 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
| Key | What it does |
|---|---|
| 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
Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:
| State | Drawn by |
|---|---|
| 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.
- How the theme moves, and how to move your own parts the same way: Motion.
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.