ResizableSplit playground
Resize either side of a center pane by pointer or keyboard and retain widths per workspace.
Preview
Files
Overview
Notes
Example controls
State matrix
Hover a specimen, Tab to focus, or hold the pointer down to inspect its native state.
| Variant | Default | Hover | Focus-visible | Active |
|---|---|---|---|---|
| Sample | Files Overview Notes | Files Overview Notes | Files Overview Notes | Files Overview Notes |
Published example
API reference'use client'
import { ResizableSplit } from '@ancrel/workspace'
import '@ancrel/tokens/css'
import '@ancrel/workspace/styles.css'
export default function App() {
return (
<ResizableSplit
left={<nav aria-label="Contents">Contents</nav>}
leftConfig={{ defaultWidth: 240, minWidth: 180, maxWidth: 360 }}
right={<aside aria-label="Notes">Notes</aside>}
rightConfig={{ defaultWidth: 280, minWidth: 200, maxWidth: 480 }}
labels={{ leftHandle: 'Resize contents', rightHandle: 'Resize notes' }}
persistKey="reading-room"
>
<article><h2>Reading room</h2><p>Use either separator to make more room for the text.</p></article>
</ResizableSplit>
)
}