On this page

Textarea

Install, props and the parts Textarea is built from.

Install

Run this in the app, after shadcn-vue init and the Beehexa theme (Button › Code):

npx shadcn-vue@latest add https://beehexa.design/r/textarea.json

Use

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

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

<template>
  <Field>
    <FieldLabel for="note">Note for the warehouse</FieldLabel>
    <Textarea id="note" v-model="note" />
  </Field>
</template>

Props

Prop Values Notes
v-model / modelValue string, number The value. Emits update:modelValue
defaultValue string, number Starting value when you don’t bind v-model
class string Merged with the Beehexa classes. Set a larger min-h-* for long text

Other attributes (id, name, rows, maxlength, disabled, aria-invalid, aria-describedby) go to the <textarea>.

Built on

A native <textarea> with the shadcn-vue Textarea API, from the control-center copy. Beehexa replaces the colours, sizes and focus with the same tokens as Input.

Limitations

  • field-sizing: content is not in every browser yet. Where it is missing, the box keeps its minimum height and scrolls.