Textarea

Multiline textarea input component.

Preview ​

Installation ​

npx sigma-ui@latest add textarea

Usage ​

vue
<script setup lang="ts">
import { ref } from 'vue';
import { Textarea } from '@/components/ui/textarea';

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

<template>
  <Textarea
    v-model="message"
    placeholder="Type your message here."
  />
</template>
  • v-model binds the value. Any other attribute, such as placeholder, rows, or disabled, is passed to the native <textarea>.

Examples ​

Default ​

Disabled ​

With Label ​

With Text ​

With Button ​

Form ​

API Reference ​

Textarea ​

Props

PropType Default
modelValue

Current value of the textarea; use with v-model.

string | number-

Events

EventPayload
update:modelValue

Emitted when the user changes the value.

unknown[]

Accessibility ​

Renders a native <textarea> element. Associate it with a Label through id and for, or set aria-label, so it has an accessible name.

KeyDescription
TabMoves focus to the textarea.
EnterInserts a new line.
Edit this page on GitHub