All Projects → raven78 → vue-resize-split-pane

raven78 / vue-resize-split-pane

Licence: MIT License
Splittable and resizable panes for Vue.js

Programming Languages

javascript
184084 projects - #8 most used programming language
Vue
7211 projects

Projects that are alternatives of or similar to vue-resize-split-pane

drawer
A touch-enabled drawer component for the modern web.
Stars: ✭ 26 (-51.85%)
Mutual labels:  ui-component
vue-g2
基于 Vue 和 AntV/G2 的可视化组件库 📈
Stars: ✭ 73 (+35.19%)
Mutual labels:  vue-component
v-bucket
📦 Fast, Simple, and Lightweight State Manager for Vue 3.0 built with composition API, inspired by Vuex.
Stars: ✭ 42 (-22.22%)
Mutual labels:  vue-component
vue-github-activity
A Vue based github feed activity component.
Stars: ✭ 28 (-48.15%)
Mutual labels:  vue-component
vue-magnify
vue-magnify / vue放大镜组件
Stars: ✭ 14 (-74.07%)
Mutual labels:  vue-component
vue-money-button
An unofficial Vue.js component for MoneyButton.
Stars: ✭ 22 (-59.26%)
Mutual labels:  vue-component
react-web-editor
The react-web-editor is a WYSIWYG editor library. you can resize and drag your component. It also has simple rich text editor
Stars: ✭ 191 (+253.7%)
Mutual labels:  resizable
v-tostini
Toast plugin for Vue.js 2.x
Stars: ✭ 12 (-77.78%)
Mutual labels:  vue-component
vue-music
基于Laravel5.3+Vue2.0的网易云音乐的SPA应用
Stars: ✭ 85 (+57.41%)
Mutual labels:  vue-component
vue-justified-layout
A component to use Flickr justified layout with Vue.
Stars: ✭ 26 (-51.85%)
Mutual labels:  vue-component
vue-tiny-pagination
A Vue component for create a tiny pagination with Flexbox
Stars: ✭ 20 (-62.96%)
Mutual labels:  vue-component
vue-github-buttons
GitHub buttons component for Vue.
Stars: ✭ 36 (-33.33%)
Mutual labels:  vue-component
vue-digital-transform
A vue component for better digital transform animation
Stars: ✭ 52 (-3.7%)
Mutual labels:  vue-component
layui-vue
layui - vue(谐音:类 UI) 是 一 套 Vue 3.0 的 桌 面 端 组 件 库
Stars: ✭ 112 (+107.41%)
Mutual labels:  vue-component
v-clappr
👏🏻Vue.js wrapper for Clappr media player
Stars: ✭ 18 (-66.67%)
Mutual labels:  vue-component
vue-telegram-login
Vue component for Telegram login
Stars: ✭ 73 (+35.19%)
Mutual labels:  vue-component
vue-next-level-scroll
Bring your scroll game to the next level!
Stars: ✭ 49 (-9.26%)
Mutual labels:  vue-component
files
Laravel Enso file management add-on for smoothing out some of common cases found when working with files
Stars: ✭ 15 (-72.22%)
Mutual labels:  vue-component
x-vue-carousel
Vue component of an awesome configurable carousel
Stars: ✭ 20 (-62.96%)
Mutual labels:  vue-component
vue-form-container
👜 A Provider Component that encapsulate your forms and handle their states and validations.
Stars: ✭ 23 (-57.41%)
Mutual labels:  vue-component

vue-resize-split-pane

Splittable and resizable panes for Vue.js

Live Demo

Install

With yarn:

yarn add vue-resize-split-pane

With npm:

npm i vue-resize-split-pane --save

Use

Global import

//main.js
import Vue from 'vue'
import ResSplitPane from 'vue-resize-split-pane'

Vue.component('rs-panes', ResSplitPane)

Local import

<template>
  <div id="app">
    <rs-panes split-to="columns" :allow-resize="true">
      <div slot="firstPane">
        FIRST
      </div>
      <div slot="secondPane">
        SECOND
      </div>
    </rs-panes>
    <!-- <router-view></router-view> -->
  </div>
</template>

<script>
  //App.vue or YourComponent.vue
  import ResSplitPane from 'vue-resize-split-pane'

  export default {
    name: 'app',
    components: {
      'rs-panes': ResSplitPane,
    },
    ...
</script>

Or you can nest them

<template>
  <div id="app">
    <rs-panes split-to="columns" :allow-resize="true">
      <div slot="firstPane">
        LEFT
      </div>
      <rs-panes :allowResize="true" split-to="rows"
        slot="secondPane" primary="second">
        <rs-panes :allowResize="true" split-to="columns" 
          slot="firstPane" primary="second">
          <div slot="firstPane">
            CENTER
          </div>
          <div slot="secondPane">
            RIGHT
          </div>
        </rs-panes>
        <div slot="secondPane">
          BOTTOM
        </div>
      </rs-panes>
    </rs-panes>
  </div>
</template>

Slots

firstPane for left column or top row

secondPane for right column or bottom row

Props

props: {
  'allow-resize': { type: Boolean, default: false },
  'split-to': { type: String, default: 'columns' }, // columns || rows
  'primary': { type: String, default: 'first' }, // first || second
  'size': { type: Number, default: 25 }, // in pixels || percents
  'units': { type: String, default: 'pixels' }, // pixels || percents
  'min-size': { type: Number, default: 16 }, // in pixels || percents
  'max-size': { type: Number, default: 0 }, // in pixels || percents
  'step': { type: Number, default: 0 }, // in pixels only
  'resizerThickness': { type: Number, default: 2 }, //in px - width of the resizer 
  'resizerColor': { type: String, default: '#AAA' }, //  any css color - if you set transparency, it will afect the border too
  'resizerBorderColor': { type: String, default: 'rgba(0,0,0, 0.15)' }, // any css color - #FFF, rgb(0,0,0), rgba(0,0,0,0)
  'resizerBorderThickness': { type: Number, default: 3 }, // in px - border that forms the shadow 
},

primary prop is used to specify which of the two panes has its size fixed.

size prop is either width or height depending on how the panes are split.

Events added in v0.1.3

update:size emited after resize, payload new size.

 <rs-panes split-to="columns" v-on:update:size="paneSize = $event" :allow-resize="true">
 ...
 </rs-panes>

Props added in v0.1.0

resizerThickness - thickness of the resize handler in normal state.

resizerColor - color of the resize handler in normal state.

resizerBorderThickness - thickness of the resize handler border in hover state.

resizerBorderColor - color of the resize handler border in hover state.

License

MIT © Valentin Bucur

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].