
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
resize-textarea-vue3
Advanced tools
A simple resize textarea for Vue3.
Inspired from vue-textarea-autosize (Works with Vue2)
Install the package using npm
npm i resize-textarea-vue3
import { createApp } from 'vue'
import ResizeTextarea from 'resize-textarea-vue3'
const app = createApp({
/* root component options */
})
app.use(ResizeTextarea)
.mount('#app')
Available props:
Props | required | type | default |
---|---|---|---|
placeholder | no | String | Null |
rows | no | Number | 2 |
cols | no | Number | 0 |
minHeight | no | Number | 50 px |
maxHeight (The content will be scrollable after set limit) | no | Number | Null |
modelValue | no | String / Number | Null |
autoResize (The drag handle is disabled by default.) | no | Booolean | true |
The default unit is (px)
Component simple usage example:
<template>
<div id="wrapper">
<resize-textarea
:placeholder="placeholder"
:rows="2"
:cols="4"
:maxHeight="150"
v-model="textValue">
</resize-textarea>
</div>
<script>
export default {
data() {
return {
placeholder: "This is a test message",
textValue: "reSize",
}
},
}
</script>
</template>
Component usage with update:modelValue event example:
<template>
<div id="wrapper">
<resize-textarea
:placeholder="placeholder"
:modelValue="textValue"
@update:modelValue="(value)=>useUpdatedValue(value)"
v-model="textValue">
</resize-textarea>
</div>
<script>
export default {
data() {
return {
placeholder: "This is a test message",
textValue: "reSize",
}
},
methods: {
useUpdatedValue(value) {
//do something
}
}
}
</script>
</template>
Component usage example with state management:
<template>
<div id="wrapper">
<resize-textarea
:placeholder="placeholder"
v-model="textValue">
</resize-textarea>
</div>
<script>
export default {
data() {
return {
placeholder: "This is a test message",
}
},
computed: {
textValue: {
get() {
return this.$store.state.textValue
},
set(v) {
this.$store.commit('UPDATE', v)
}
}
}
}
</script>
</template>
FAQs
**A simple resize textarea for Vue3.**
The npm package resize-textarea-vue3 receives a total of 332 weekly downloads. As such, resize-textarea-vue3 popularity was classified as not popular.
We found that resize-textarea-vue3 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
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.