Vue Split Pane is a component designed for Vue 2 applications, enabling the creation of resizable split panels either vertically or horizontally. It provides a straightforward way to divide layout space into two adjustable panes, which can also be nested for more complex layouts. The package is currently at version 1.0.6, with the last notable activity (according to provided snippets) in 2022, primarily focused on minor bug fixes and feature enhancements like emitting current percent values. Given its exclusive support for the End-of-Life (EOL) Vue 2 framework, its release cadence is effectively ceased, and it should be considered in a maintenance or abandoned state. Its key differentiator is its simplicity and direct compatibility with legacy Vue 2 projects requiring basic split-pane functionality without migrating to newer frameworks or complex libraries.
npm install vue-splitpaneVerified import paths — ran on the pinned version, not inferred.
This example demonstrates global registration of `split-pane`, its basic usage with vertical splitting, and a nested horizontal split pane. It includes a `resize` event handler and dynamic percentage display.
For Vue 3 projects, seek a dedicated split-pane component compatible with Vue 3, or rewrite the functionality using Vue 3's composition API and reactive primitives.
Always include `:split="'vertical'"` or `:split="'horizontal'"` when using the component. Example: `<split-pane split="vertical">`.
Understand that `min-percent='20'` means the left/top pane cannot be smaller than 20% of the total width/height. Adjust these values based on the desired bounds for `paneL`.
Register the component: `import splitPane from 'vue-splitpane'; Vue.component('split-pane', splitPane);` for global use, or add `components: { splitPane }` to your Vue component options for local use.Define the method in your Vue component's `methods` option. For example: `methods: { myResizeHandler(newPercent) { console.log('Resized:', newPercent); } }`.Add the `split` prop and assign it either 'vertical' or 'horizontal'. For example: `<split-pane split="vertical">`.