Skip to content

Textarea 文本域

Form · Interactive component

Multi-line text with character counting.

On-demand importwbbb-ui/components/textarea

Basic Usage

Example code
<script setup lang="ts">
import { ref } from 'vue'
import { WbbbTextarea } from 'wbbb-ui/components/textarea'
import 'wbbb-ui/styles/textarea'

const value = ref('')
</script>

<template>
  <WbbbTextarea v-model="value" />
</template>
Live mobile previewOpen in a new tab ↗

States and Interaction

All listed states can be operated and verified in the live Playground preview.

DefaultFilledFocusDisabledError

API Reference

Props

PropertyDescriptionTypeDefaultRequired
autoHeightMakes the textarea grow with its content.booleanfalseNo
disabledPrevents user interaction with the component.booleanfalseNo
errorShows the component in its error visual state.booleanfalseNo
maxlengthLimits the number of characters that can be entered.number200No
modelValueProvides the current value used by v-model.string''No
placeholderSets placeholder text when no value is present.string''No
readonlyPrevents editing while keeping the value readable.booleanfalseNo
showCountShows the current character count.booleanfalseNo

Events

  • update:modelValue
  • blur
  • change
  • focus

Slots

None

Two-way binding

Supports v-model (modelValue).

Platform Notes

Build verification: H5, App Vue, WeChat Mini Program, Alipay Mini Program, and Douyin Mini Program.

Runtime differences: H5 supports keyboard focus and reduced motion. Mini Programs provide equivalent touch interaction; verify upload, date selection, and overlays on target platforms.

Usage note: Use Playground to verify further state combinations and cross-platform behavior.

Wbbb UI · Built for uni-app product experiences