Split UI

API Reference

Complete API documentation for @split-ui/react components.

Panel

A flexible panel component for creating resizable layouts.

Panels can act as containers (when group is true) or as content areas. Container panels hold child panels and resizers to create complex layouts. Content panels hold your application content and can be resized by adjacent resizers.

import { Panel } from '@split-ui/react';

Props

children

Content to render inside the panel.

group

Whether this panel acts as a container for other panels and resizers. When true, the panel becomes a flex container that can hold child panels and resizers.

orientation

Layout orientation for panel groups.

initialSize

Initial size of the panel. Accepts any valid CSS size value. When provided, the panel has a fixed initial size and won't automatically grow/shrink. When omitted, the panel will automatically fill available space.

minSize

Minimum size constraint for the panel. Accepts any valid CSS size value. Prevents the panel from being resized smaller than this value.

maxSize

Maximum size constraint for the panel. Accepts any valid CSS size value. Prevents the panel from being resized larger than this value.

persistenceId

Unique identifier for persisting panel sizes across browser sessions. When provided, panel sizes are automatically saved to localStorage and restored on page load. Use the same persistenceId across multiple panel groups to sync their layouts.

index

Unique identifier for the panel within its parent group. Used for persistence and conditional rendering scenarios. If not provided, an auto-generated index will be used.

className

Additional CSS class names to apply to the panel element.

style

Inline styles to apply to the panel element.

Flex Behavior

Panels automatically handle flex-grow and flex-shrink based on whether they have an initialSize prop:

Resizer

A resizer component that allows users to adjust the size of adjacent panels.

Must be placed between Panel components within a Panel group to enable resizing. Supports mouse, touch, and keyboard interaction for accessibility.

import { Resizer } from '@split-ui/react';

Props

className

Additional CSS class names to apply to the resizer element.

style

Inline styles to apply to the resizer element.

children

Content to render inside the resizer. Useful for adding custom drag handles or visual indicators.