Skip to content

Textarea ​

Multi-line text input with character count, auto-resize, and validation.

Open in Storybook

Interactive Demo ​

Message

States ​

Input states

Default
With Error
Disabled

Usage ​

vue
<script setup>
import { ref } from 'vue';
import { Textarea } from '@yellowcard/b2b-design-system';

const message = ref('');
</script>

<template>
  <Textarea
    v-model="message"
    label="Message"
    placeholder="Type your message..."
    :maxLength="500"
    showCharCount
  />
</template>

API Reference ​

Props ​

PropTypeDefaultDescription
modelValuestring—Text value (v-model)
size'large' | 'small''large'Input size
labelstring—Label text
placeholderstring—Placeholder text
helperTextstring—Helper text below input
errorMessagestring—Error message (activates error state)
disabledbooleanfalseDisabled state
readonlybooleanfalseRead-only state
requiredbooleanfalseRequired indicator
skeletonbooleanfalseSkeleton loading
rowsnumber—Visible text rows
maxLengthnumber—Maximum character count
showCharCountbooleanfalseShow character counter
autoResizebooleanfalseAuto-resize height

Events ​

EventPayloadDescription
update:modelValuestringValue changed
focusFocusEventInput focused
blurFocusEventInput blurred