Splitter
The Splitter component allows users to resize panels by dragging a handle between them. It supports horizontal, vertical, multi-panel, controlled, and store-driven configurations.
Define sizing constraints and collapse/restore behavior while retaining keyboard resizing. Stable panel identities matter for dynamic or persisted layouts.
Included icon notices
The source viewer includes ICON_ATTRIBUTION.md and original notices for the icon collections used by these examples. Preserve them when redistributing examples; react-icons' wrapper license does not replace individual collection terms.
- Lucide: ISC
Installation and initialization
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
Initialize ChakraProvider with defaultSystem and Emotion before rendering. Preserve the host React version and inspect peer compatibility. Official npm installation supplies components, not these example source files. Use the resource setup guide for locale, next-themes and framework-specific SSR; copy the selected example source separately from npm installation.
Complete native usage example
This is the actual pinned example, not a generic API mock. Copy its source closure and retain the named export. Additional imports are listed per example below.
import { Center, Splitter } from "@chakra-ui/react"
export const SplitterBasic = () => {
return (
<Splitter.Root
panels={[{ id: "a" }, { id: "b" }]}
borderWidth="1px"
minH="60"
>
<Splitter.Panel id="a">
<Center boxSize="full" textStyle="2xl">
A
</Center>
</Splitter.Panel>
<Splitter.ResizeTrigger id="a:b" />
<Splitter.Panel id="b">
<Center boxSize="full" textStyle="2xl">
B
</Center>
</Splitter.Panel>
</Splitter.Root>
)
}
All examples and reproduction requirements
Names identify demos, not component variant props. Copy every sourceFiles entry for the selected example. The compositions alias denotes local files, not a package. Preserve relative imports or rewrite the alias to your project's actual path. React peers are inspected separately; editor examples retain the coherent pinned Tiptap extension family.
Basic
splitter-basic · Named export SplitterBasic · original upstream example
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
vendor/apps/compositions/src/examples/splitter-basic.tsx
Controlled
splitter-controlled · Named export SplitterControlled · original upstream example
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0 react-icons@5.6.0
vendor/apps/compositions/src/examples/splitter-controlled.tsx
With Store
splitter-with-store · Named export SplitterWithStore · original upstream example
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
vendor/apps/compositions/src/examples/splitter-with-store.tsx
Vertical
splitter-vertical · Named export SplitterVertical · original upstream example
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
vendor/apps/compositions/src/examples/splitter-vertical.tsx
Responsive Orientation
splitter-responsive-orientation · Named export SplitterResponsiveOrientation · original upstream example
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
vendor/apps/compositions/src/examples/splitter-responsive-orientation.tsx
Multiple Panels
splitter-multiple-panels · Named export SplitterMultiplePanels · original upstream example
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
vendor/apps/compositions/src/examples/splitter-multiple-panels.tsx
Collapsible
splitter-collapsible · Named export SplitterCollapsible · original upstream example
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0 react-icons@5.6.0
vendor/apps/compositions/src/examples/splitter-collapsible.tsx
Min Max Constraints
splitter-min-max-constraints · Named export SplitterMinMaxConstraints · original upstream example
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0 react-icons@5.6.0
vendor/apps/compositions/src/examples/splitter-min-max-constraints.tsx
Css Units
splitter-css-units · Named export SplitterCssUnits · original upstream example
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
vendor/apps/compositions/src/examples/splitter-css-units.tsx
Resize Behavior
splitter-resize-behavior · Named export SplitterResizeBehavior · original upstream example
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
vendor/apps/compositions/src/examples/splitter-resize-behavior.tsx
Nested
splitter-nested · Named export SplitterNested · original upstream example
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
vendor/apps/compositions/src/examples/splitter-nested.tsx
With Storage
splitter-with-storage · Named export SplitterWithStorage · original upstream example
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0 react-icons@5.6.0 react-use@17.6.1
vendor/apps/compositions/src/examples/splitter-with-storage.tsx
Disabled
splitter-disabled · Named export SplitterDisabled · original upstream example
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
vendor/apps/compositions/src/examples/splitter-disabled.tsx
Separator Only
splitter-separator-only · Named export SplitterSeparatorOnly · original upstream example
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
vendor/apps/compositions/src/examples/splitter-separator-only.tsx
Reset On Double Click
splitter-reset-on-double-click · Named export SplitterResetOnDoubleClick · original upstream example
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
vendor/apps/compositions/src/examples/splitter-reset-on-double-click.tsx
Resize Events
splitter-resize-events · Named export SplitterResizeEvents · original upstream example
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0 react-icons@5.6.0 && npm install -D @types/node@22.19.19
vendor/apps/compositions/src/examples/splitter-resize-events.tsx
Keyboard Resize
splitter-keyboard-resize · Named export SplitterKeyboardResize · original upstream example
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0 react-icons@5.6.0
vendor/apps/compositions/src/examples/splitter-keyboard-resize.tsx
Conditional Rendering
splitter-conditional-rendering · Named export SplitterConditionalRendering · original upstream example
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
vendor/apps/compositions/src/examples/splitter-conditional-rendering.tsx
Dynamic Panel
splitter-dynamic-panel · Named export SplitterDynamicPanel · original upstream example
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0 react-icons@5.6.0
vendor/apps/compositions/src/examples/splitter-dynamic-panel.tsx
Ide Layout
splitter-ide-layout · Named export SplitterIdeLayout · original upstream example
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0 react-icons@5.6.0 shiki@3.23.0
vendor/apps/compositions/src/examples/splitter-ide-layout.tsx
Native API and source references
The source viewer retains original declarations, imports and inheritance. Ark UI event contracts, Chakra style props and recipe types stay in their native packages; this guide does not flatten or invent their defaults. Code comments remain original source, not translated prose.
npm/@chakra-ui/react@3.37.0/dist/types/components/splitter/index.d.tsnpm/@chakra-ui/react@3.37.0/dist/types/components/splitter/namespace.d.tsnpm/@chakra-ui/react@3.37.0/dist/types/components/splitter/splitter.d.ts
State and installation checks
Run strict types, the target production build and real interactions. Test labels/focus/keyboard, both themes, narrow layout, empty/loading/error states where supported and cleanup after unmount. Remote demo endpoints, uploads and downloads are constrained in the preview; configure your own services. Copying a command or reaching preview-ready does not prove installation or backend success.
Provenance and license boundaries
https://github.com/chakra-ui/chakra-ui/tree/2e7517745cff2fcde0b8012f136cf99611ff262a
These are JGuang practical bilingual notes, not a full translation of upstream MDX. Original documentation and example bytes remain in vendor. Preserve repository MIT, compositions ISC metadata and separate dependency notices. The original metadata discrepancy and any missing full notices remain explicit review items; paid Chakra Pro is excluded.