Resizable
Accessible resizable panel groups and layouts with keyboard support.
About
The Resizable component is built on a JavaScript port of react-resizable-panels v4 by bvaughn. It has the same layout rules, keyboard support and cursors, without the npm package.
Installation
Usage
<ResizablePanelGroup Orientation="Orientation.Horizontal">
<ResizablePanel>One</ResizablePanel>
<ResizableHandle />
<ResizablePanel>Two</ResizablePanel>
</ResizablePanelGroup>Composition
Use the following composition to build a ResizablePanelGroup:
ResizablePanelGroup
├── ResizablePanel
├── ResizableHandle
└── ResizablePanelVertical
Use Orientation="Orientation.Vertical" for vertical resizing.
Handle
Use the WithHandle parameter on ResizableHandle to show a visible handle.
Without Dragging
A handle resizes by dragging, and by the arrow keys, Home and End once it has focus. Pointer
users who can't drag need another way too (WCAG 2.5.7):
SetLayoutAsync on ResizablePanelGroup sets the sizes from buttons, a menu or anything else.
RTL
To enable RTL support in Blazix, see the RTL configuration guide.
Translated with AI for the demo, so it may have mistakes.
API Reference
Sizes follow react-resizable-panels: a plain number is a percentage, and %, px, rem, em, vh and vw units work too.
ResizablePanelGroup
Other attributes are passed to the element it renders.
ResizablePanel
Other attributes are passed to the element it renders.
ResizableHandle
Other attributes are passed to the element it renders.