# vue-multipane

> Resizable split panes for Vue.js.

Latest version **0.9.5** (published 2017-10-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-multipane
pnpm add vue-multipane
yarn add vue-multipane
bun add vue-multipane
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.9.5 |
| Published | 2017-10-03 |
| First published | 2017-09-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=6.0.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 601 |
| Author | Yan Sern |
| Maintainers | yansern |
| Keywords | vue, multipane, split pane, ui, resize, resizeable, layout, flexbox, components |

## Links

- npm: https://www.npmjs.com/package/vue-multipane
- Repository: https://github.com/yansern/vue-multipane
- Homepage: https://github.com/yansern/vue-multipane/index.html
- Issues: https://github.com/yansern/vue-multipane/issues
- npm.io page: https://npm.io/package/vue-multipane

## Alternatives

- [@progress/kendo-ooxml](https://npm.io/package/@progress/kendo-ooxml.md) — 152.1K weekly downloads
- [@progress/kendo-react-ripple](https://npm.io/package/@progress/kendo-react-ripple.md) — 8.0K weekly downloads
- [@progress/kendo-react-orgchart](https://npm.io/package/@progress/kendo-react-orgchart.md) — 4.3K weekly downloads
- [@praxisui/dynamic-fields](https://npm.io/package/@praxisui/dynamic-fields.md) — 2.4K weekly downloads
- [@progress/kendo-vue-listbox](https://npm.io/package/@progress/kendo-vue-listbox.md) — 932 weekly downloads

## Recent versions

- 0.9.5 (latest) — 2017-10-03
- 0.9.4 — 2017-10-03
- 0.9.3 — 2017-09-29
- 0.9.2 — 2017-09-28
- 0.9.1 — 2017-09-28

## README

# vue-multipane ![npm tag](https://img.shields.io/npm/v/vue-multipane.svg)
> Resizable split panes for [Vue.js](http://vuejs.org).

<p align="center">
  <img src="https://raw.githubusercontent.com/yansern/vue-multipane/master/demo/preview.gif" />
  <br/>
  <b>Check out the <a href="https://yansern.github.io/vue-multipane/demo/index.html" target="_blank">live demo</a>.</b>
</p>

## Features

* Uses CSS3 Flexbox.
* Supports vertical & horizontal layouts.
* Supports fixed and fluid panes.
* Configure everything using CSS!

## Installation
```bash
$ npm install vue-multipane
```

## Using vue-multipane

First, import `vue-multipane` into your Vue component.
```js
import { Multipane, MultipaneResizer } from 'vue-multipane';

export default {
  // ...
  components: {
    MultiPane,
    MultiPaneResizer
  }
}
```

Then, construct your split pane layout using multipane component.
```html
<multipane>
  <div>Pane 1</div>
  <multipane-resizer></multipane-resizer>
  <div>Pane 2</div>
  <multipane-resizer></multipane-resizer>
  <div>Pane 3</div>
</multipane>
```

## Customizing pane layout
You can customize pane layouts using CSS.

* Create vertical/horizontal layouts using `layout="vertical|horizontal"` attribute.
* Set initial pane size using `width|height` CSS property.
* Set pane size constraints using `min-width|min-height|max-width|max-height` CSS property.
* Create fixed/fluid combination panes by using `px|%` units.
* Use `flex-grow: 1` for that one pane that should take all remaining space available on the multipane container.

This example below shows a combination of different styling properties you can apply to make the panes render the way you want it to:
```html
<multipane class="foo" layout="vertical">
  <div :style="{ width: '100px', maxWidth: '200px' }">Pane 1</div>
  <multipane-resizer></multipane-resizer>
  <div :style="{ width: '25%', maxWidth: '50%' }">Pane 2</div>
  <multipane-resizer></multipane-resizer>
  <div :style="{ flexGrow: 1 }">Pane 3</div>
</multipane>

```

## Customizing resize handle
By default, vue-multipane creates an invisible 10px resize handle that sits in between 2 panes. You can customize the appearance of the resize handle to fit your needs.

This example below creates a 15px blue resize handle:

```css
.multipane.foo.layout-v .multipane-resizer {
  margin: 0; left: 0; /* reset default styling */
  width: 15px;
  background: blue;
}

.multipane.foo.layout-h .multipane-resizer {
  margin: 0; top: 0; /* reset default styling */
  height: 15px;
  background: blue;
}

```

#### Optional resize handle
You can also add resize handle only specific panes by just adding `<multipane-resizer>` next it.

```html
<multipane>
  <div>Pane 1</div> <!-- No resizing on Pane 1. -->
  <div>Pane 2</div> <!-- Resizing is possible on Pane 2. -->
  <multipane-resizer></multipane-resizer>
  <div>Pane 3</div>
</multipane>
```

## Options

** Multipane **

|    Property    |    Description   |   Type     |  Default     |
| -------------- | ---------------- | :--------: | :----------: |
| layout         | Determine layout of panes. | String [vertical, horizontal] |vertical |

## Events

** Multipane **

|    Event           |    Description   |   Returns  |
| ------------------ | ---------------- | :--------: |
| paneresizestart    | When user clicks on the resize handle to start resizing a pane. | pane, container, size |
| paneresize         | When user is resizing a pane. | pane, container, size |
| paneresizestop     | When user release the resize handle to stop resizing a pane. | pane, container, size |

## License
**[vue-multipane](https://github.com/yansern/vue-multipane)** by [Yan Sern](https://twitter.com/yansernio) licensed under [MIT](LICENSE).

> PS: I would love to know if you're using vue-multipane. Tweet to me at [@yansernio](https://twitter.com/yansernio).

---
_Source: https://npm.io/package/vue-multipane · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
