
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
vue3-resizable
Advanced tools
Vue3 is used for components with resizable and draggable elements.
🐳 Vue 3 Composition API
🔥 Written in TypeScript
English · 简体中文 · Demo/Document
Install using npm:
npm install vue3-resizable
Install using pnpm:
pnpm install vue3-resizable
Or using yarn:
yarn add vue3-resizable
First, ensure that you import the component in your Vue project:
import { createApp } from "vue"
import App from "./App.vue"
import LResize from "vue3-resizable"
import "vue3-resizable/dist/index.css"
const app = createApp(App)
app.use(LResize)
app.mount("#app")
import { LResize } from "vue3-resizable"
import "vue3-resizable/dist/index.css"
<template>
<LResize
:minWidth="100"
:minHeight="100"
:maxWidth="300"
:maxHeight="300"
:initialWidth="150"
:initialHeight="150"
:initialTop="50"
:initialLeft="50"
:cssUnit="'px'"
:showDimension="true"
:showPosition="true"
>
<!-- You can insert any custom content here -->
<div>Resizable content container</div>
</LResize>
</template>
Prop | 类型 | 默认值 | 描述 |
---|---|---|---|
minWidth | number | 30 | Minimum width limit |
minHeight | number | 30 | Minimum height limit |
maxWidth | number | none | Maximum width limit |
maxHeight | number | none | Maximum height limit |
initialWidth | number | 200 | Initial width |
initialHeight | number | 200 | Initial height |
initialTop | number | 100 | Initial top offset |
initialLeft | number | 100 | Initial left offset |
cssUnit | 'px' | 'rem' | string | 'px' | Size unit |
showDimension | boolean | false | Show size info |
showPosition | boolean | false | Show position info |
style | CSSProperties | {} | Container style |
handleStyle | CSSProperties | {} | Drag handle style |
Slot Name | Description |
---|---|
default | Insert custom content |
Event Name | Description | Parameters |
---|---|---|
boxUpdated | Triggered when the box size or position is updated | BoxState |
Parameter Name | Type | Description |
---|---|---|
width | number | Width of the box |
height | number | Height of the box |
top | number | Top position of the box |
left | number | Left position of the box |
zIndex | number | z-index value of the box |
Method Name | Description | Parameters |
---|---|---|
updateBoxStyle | Update box style | () => void |
startDrag | Start dragging | () => void |
endDrag | End dragging | () => void |
startResize | Start resizing | () => void |
endResize | End resizing | () => void |
To contribute to the development of this component, you can clone the source code repository and install all dependencies:
git clone https://github.com/LostElkByte/vue3-resizable.git
cd vue3-resizable
npm install
Contributions are welcome through Issues or Pull Requests. Please ensure your code follows the project's style and quality standards.
This project is licensed under the MIT License. For more information, please see the LICENSE file.
FAQs
Vue3 is used for components with resizable and draggable elements.
The npm package vue3-resizable receives a total of 93 weekly downloads. As such, vue3-resizable popularity was classified as not popular.
We found that vue3-resizable demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.