Resizable
Drag-to-resize panel groups for building split-pane layouts, powered by react-resizable-panels.
Install
Pull Resizable from the barrel for everyday use, or the granular path when you want a tighter bundle.
import { Resizable } from "@brika/clay";import { Resizable } from "@brika/clay/components/resizable";A minimal example
Drop this into a page. Native HTML attributes pass through to the underlying primitive.
import {
ResizableHandle,
ResizablePanel,
ResizablePanelGroup,
} from '@brika/clay/components/resizable';
export default function ResizableDefaultDemo() {
return (
<ResizablePanelGroup
orientation="horizontal"
className="max-w-md rounded-lg border"
>
<ResizablePanel defaultSize={50}>
<div className="flex h-32 items-center justify-center p-6 text-sm">
Left
</div>
</ResizablePanel>
<ResizableHandle withHandle />
<ResizablePanel defaultSize={50}>
<div className="flex h-32 items-center justify-center p-6 text-sm">
Right
</div>
</ResizablePanel>
</ResizablePanelGroup>
);
}Resizable, every way
Vertical
Accessibility
- The resize handle carries
role="separator"and responds to arrow keys for keyboard resizing. -
withHandlerenders a visible grip icon, improving discoverability of the resize affordance. - Ensure panels have meaningful
aria-labelvalues when used as distinct content regions.
Theme tokens
Every CSS variable Resizable reads, with its default and the
dotted path you'd write in a ThemeConfig JSON
to override it. Set any of these in your theme to retune Resizable
without touching component code.
Resizable tokens
7 tokens--resizable-handle-colorcolorvar(--border)components.resizable.handleColorResting handle color.
--resizable-handle-hovercolorvar(--primary)components.resizable.handleHoverHover-state handle color; applied at 40% opacity.
--resizable-handle-ringcolorvar(--ring)components.resizable.handleRingFocus ring color drawn around the handle when keyboard-focused.
--resizable-grip-bordercolorvar(--border)components.resizable.gripBorderBorder color of the optional grip pill rendered when `withHandle` is set.
--resizable-grip-containercolorvar(--background)components.resizable.gripContainerBackground fill of the optional grip pill rendered when `withHandle` is set.
--resizable-grip-iconcolorvar(--muted-foreground)components.resizable.gripIconIcon color of the grip glyph drawn inside the optional grip pill.
--resizable-handle-sizesize1pxcomponents.resizable.handleSizeResize handle thickness along the resize axis.
Override in a theme
Authoring a theme is plain JSON. Drop overrides under
components.resizable, the names
are camelCase versions of the variable suffix.
{
"id": "my-theme",
"name": "My Theme",
"description": "...",
"accentSwatches": ["#000"],
"components": {
"resizable": {
"handleSize": "1px"
}
}
}
Then apply with applyTheme(myTheme)
(see the theming guide),
scope it to a subtree with themeToCssVars(myTheme, mode),
or consume any token directly in your own JSX with the matching Tailwind utility
(e.g. bg-resizable-…) — see the
chips on each token row.
API reference
Props specific to Resizable. Native HTML attributes pass through to the underlying primitive, see the component source on GitHub for the full type signature.
<ResizableHandle />
1 prop- booleanRenders a visible grip icon on the handle.
<ResizablePanel />
passthroughNo wrapper-specific props, all attributes pass through to the underlying primitive.
<ResizablePanelGroup />
passthroughNo wrapper-specific props, all attributes pass through to the underlying primitive.