Search documentation

Search the documentation and open a page.

Accessible resizable panel groups and layouts with keyboard support.

Loading...

Installation

pnpm dlx shadcn@latest add @wirekyt/resizable

Composition

<app-resizable> ├── [appResizablePanel] ├── <app-resizable-handle> │ └── generated handle icon (optional) └── [appResizablePanel]

Examples

Collapsible

Loading...

Controlled

Loading...

Default

Loading...

Disabled

Loading...

Size Constraints

Loading...

Vertical

Loading...

With Handle

Loading...

API Reference

<app-resizable>

Inputs

InputTypeDefaultDescription
idstring | undefinedgeneratedUnique identifier used to create the splitter part IDs.
idsSplitterElementIds | undefined—Overrides the generated IDs for individual parts.
orientation"horizontal" | "vertical" | undefined"horizontal"Sets the layout and keyboard navigation axis.
sizeArray<number | string> | undefined—Panel sizes when controlled. Supports Angular two-way binding.
defaultSizeArray<number | string> | undefined[]Initial panel sizes when uncontrolled.
panelsSplitterPanelData[]requiredDescribes the panels, their order, constraints, and collapse state.
keyboardResizeBynumber | null | undefined—Amount to resize by when an arrow key is pressed.
noncestring | undefined—CSP nonce applied to the splitter's generated styles.
registrySplitterRegistry | undefined—Registry used to coordinate resize handles.

Outputs

OutputTypeDescription
sizeChangeArray<number | string> | undefinedEmits the current controlled panel sizes.
resizeSplitterResizeDetailsEmits details while panel sizes change.
resizeStartvoidEmits when a pointer or keyboard resize starts.
resizeEndSplitterResizeEndDetailsEmits details when resizing ends.
collapseSplitterExpandCollapseDetailsEmits when a collapsible panel collapses.
expandSplitterExpandCollapseDetailsEmits when a collapsed panel expands.

[appResizablePanel]

Inputs

InputTypeDefaultDescription
idSplitterPanelIdrequiredID matching an entry in the panel data.

<app-resizable-handle>

Inputs

InputTypeDefaultDescription
idSplitterResizeTriggerIdrequiredIDs of the adjacent panels in the form "before:after".
disabledbooleanfalseDisables pointer and keyboard resizing through this handle.
withHandlebooleanfalseDisplays the visual grip inside the resize handle.

Context, Providers, and Utilities

ExportAngular API
SplitterRootProviderDirective that provides an externally created splitter API through value.
SplitterContextStructural directive [splitter-context] exposing the root API to a template.
useSplitter(options)Creates the signal-backed splitter machine inside an injection context.
injectSplitterContext()Injects the nearest splitter root context.
injectSplitterResizeTriggerContext()Injects the nearest resize-trigger context.
createSplitterRegistry(props)Creates a registry used to coordinate resize handles.
getSplitterLayout(panels)Returns the CSS grid layout for a panel configuration.
ResizableImportsReadonly collection containing the resizable UI and context helpers.

Types

ExportDescription
SplitterApiConnected splitter state and actions.
SplitterElementIdsOverrides for generated splitter part IDs.
SplitterPanelDataPanel ID, ordering, size constraints, and collapse configuration.
SplitterPanelIdIdentifier for a panel.
SplitterResizeTriggerIdIdentifier joining the panels adjacent to a resize handle.
SplitterResizeTriggerStateDragging, focus, and disabled state for a resize handle.
SplitterResizeDetailsDetails emitted by resize.
SplitterResizeEndDetailsDetails emitted by resizeEnd.
SplitterExpandCollapseDetailsDetails emitted by collapse and expand.
SplitterHitAreaMarginsCoarse and fine pointer hit-area margins.
SplitterRegistryOptionsOptions used to configure a splitter registry.
SplitterRegistryPropsAngular options accepted by createSplitterRegistry.
SplitterRegistryReturnRegistry returned by createSplitterRegistry.
SplitterResizeTriggerContextSignal-backed state exposed for the nearest resize handle.
UseSplitterOptionsOptions accepted by useSplitter.
UseSplitterPropsRoot props accepted by the splitter machine.
UseSplitterReturnSignal-backed splitter machine returned by useSplitter.