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
modelValuestringText value (v-model)
size'large' | 'small''large'Input size
labelstringLabel text
placeholderstringPlaceholder text
helperTextstringHelper text below input
errorMessagestringError message (activates error state)
disabledbooleanfalseDisabled state
readonlybooleanfalseRead-only state
requiredbooleanfalseRequired indicator
skeletonbooleanfalseSkeleton loading
rowsnumberVisible text rows
maxLengthnumberMaximum character count
showCharCountbooleanfalseShow character counter
autoResizebooleanfalseAuto-resize height

Events

EventPayloadDescription
update:modelValuestringValue changed
focusFocusEventInput focused
blurFocusEventInput blurred