https://github.com/64robots/vue-resize-element
Wrapper that allows resize element passed as slot
https://github.com/64robots/vue-resize-element
Last synced: 2 months ago
JSON representation
Wrapper that allows resize element passed as slot
- Host: GitHub
- URL: https://github.com/64robots/vue-resize-element
- Owner: 64robots
- License: mit
- Created: 2018-11-09T14:21:16.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-09T14:44:58.000Z (over 7 years ago)
- Last Synced: 2025-02-16T12:29:56.895Z (over 1 year ago)
- Language: JavaScript
- Size: 197 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vue Resize Element
> A Wrapper that allows to resize the element passed as slot
## Usage
### Directly in the browser
Drop the library in with a `` tag alongside Vue to globally install the component:
```html
<div id="app"><resize-element>My Element</resize-element></div>
<script src="https://unpkg.com/vue">
new Vue({ el: '#app' })
```
### In a module system (without Vue CLI)
Install the library with NPM:
```bash
npm install vue-resize-element
```
Then register the library as a plugin to globally install the component:
```js
import ResizeEmelent from 'vue-resize-element'
Vue.use(ResizeEmelent)
```
Or, import the component individually for local registration:
```js
import { ResizeEmelent } from 'vue-resize-element'
export default {
components: { ResizeEmelent }
}
```
### In a module system (with Vue CLI)
> If using Vue CLI 3 with Babel or TypeScript, it's recommended that you import the library from its `src` directory. This will minimize the size of your application by preventing duplicate or unnecessary polyfills.
Install the library with NPM:
```bash
npm install vue-resize-element
```
Then register the library as a plugin to globally install all components:
```js
import ResizeEmelent from 'vue-resize-element/src'
Vue.use(ResizeEmelent)
```
Or, import components individually for local registration:
```js
import { ResizeEmelent } from 'vue-resize-element/src'
export default {
components: { ResizeEmelent }
}
```