KTextarea
Basic Textarea
Auto Resize
Character Count
0 / 120
Error State
Message is required.
Disabled State
Multi-line textarea with v-model binding and optional auto-resize.
Props
| Name | Type | Default | Description |
|---|---|---|---|
| modelValue | string | '' | Bound value via v-model. |
| placeholder | string | '' | Placeholder text. |
| disabled | boolean | false | Whether the textarea is disabled. |
| error | boolean | false | Whether to show error styling (destructive border). |
| maxlength | number | — | Maximum number of characters allowed. |
| autoResize | boolean | false | Whether the textarea automatically resizes to fit content. |
| rows | number | — | Native textarea rows attribute for fixed-height layouts. |
Emits
| Name | Parameters | Description |
|---|---|---|
| update:modelValue | (value: string) | Emitted when the textarea value changes. |
Basic Usage
vue
<script setup>
import { ref } from 'vue'
import { KTextarea } from '@kK-2004/ui-component'
const text = ref('')
</script>
<template>
<KTextarea v-model="text" placeholder="Type something..." auto-resize />
</template>