2.1.7 • Published 2 years ago

vue-resizable v2.1.7

Weekly downloads
3,036
License
MIT
Repository
github
Last release
2 years ago

VueResizable

Latest Version on NPM npm Software License

npm.io

Vue component that allows you to resize and drag elements

Demo

Demo page\ CodeSandbox\ Material window

Installation

npm install vue-resizable --save

Basic usage

<template>
    <vue-resizable>
        <div class="resizable-content"></div>
    </vue-resizable>
</template>

<script>
import VueResizable from 'vue-resizable'

export default {
    name: "YourApp",
    components: {VueResizable}
}
</script>

<style scoped>
    .resizable-content {
        height: 100%;
        width: 100%;
        background-color: aqua;
    }
</style>

Properties

PropertyData attributeTypeDefaultDescription
widthwNumber, StringundefinedWidth in pixel or 'auto'
minWidthminWNumber0Minimum width
maxWidthmaxWNumberundefinedMaximum width
heighthNumber, StringundefinedHeight in pixel, or 'auto'
minHeightminHNumber0Minimum height
maxHeightmaxHNumberundefinedMaximum height
leftlNumber, String0Offset left from parent
toptNumber, String0Offset top from parent
activeArray'r', 'rb', 'b', 'lb', 'l', 'lt', 't', 'rt'Active handlers for resize
fitParentBooleanfalseRespect parent's size on resizing
dragSelectordragElementsStringundefinedDrag selector
maximizeBooleanfalseMaximize element to parent size
disableAttributescalcMapArray[]Disable changes to attributes, Available values: 'l', 't', 'w', 'h'

Events

NamePayloadDescription
mounteventName,left,top,width,heightCalled after the component is mounted
destroyeventName,left,top,width,heightCalled before the component is destroyed
resize:starteventName,left,top,width,heightCalled after clicking on one of the active handlers
resize:moveeventName,left,top,width,heightCalled when a handler is being dragged
resize:endeventName,left,top,width,heightCalled when the mouse button was released after resize
drag:starteventName,left,top,width,heightCalled after clicking on one of the drag elements
drag:moveeventName,left,top,width,heightCalled when a drag element is being dragged
drag:endeventName,left,top,width,heightCalled when the mouse button was released after drag
maximizeeventName,left,top,width,height, stateCalled when "maximize" state changed

Development

To begin development, run:

npm install 
npm run dev

It starts webpack-dev-server on localhost:8080 with Demo page.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

1.3.4

2 years ago

1.3.3

2 years ago

2.1.6

2 years ago

2.1.7

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.4

2 years ago

2.1.3

2 years ago

2.1.5

2 years ago

2.1.0

2 years ago

1.3.0

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.1.2

4 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

6 years ago