Are you an LLM? You can read better optimized documentation at /components/text-area.md for this page in Markdown format
Text area ​
Stable
Lets users enter longer text, such as a description or a note.
vue
<script setup lang="ts">
import { HTextArea } from '@holistics/design-system'
</script>
<template>
<HTextArea
class="w-[200px]"
icon-left="info"
icon-right="circle-question-mark"
top-text="Label"
bottom-text="Description"
placeholder="Placeholder"
/>
</template>Examples ​
Disabled ​
vue
<script setup lang="ts">
import { HTextArea } from '@holistics/design-system'
</script>
<template>
<HTextArea
class="w-[200px]"
icon-left="info"
icon-right="circle-question-mark"
top-text="Label"
bottom-text="Description"
placeholder="Placeholder"
disabled
/>
</template>Error ​
vue
<script setup lang="ts">
import { HTextArea } from '@holistics/design-system'
</script>
<template>
<HTextArea
class="w-[200px]"
icon-left="info"
icon-right="circle-question-mark"
top-text="Label"
bottom-text="Error message"
placeholder="Placeholder"
is-invalid
/>
</template>Resize ​
Control the resize behavior with the resize prop: none, both, horizontal, or vertical.
vue
<script setup lang="ts">
import { HTextArea } from '@holistics/design-system'
const sizes = ['none', 'both', 'horizontal', 'vertical'] as const
</script>
<template>
<div class="grid grid-cols-2 gap-4">
<HTextArea
v-for="resize in sizes"
:key="resize"
:resize
class="w-[260px]"
:top-text="'resize="' + resize + '"'"
:placeholder="resize === 'none'
? 'Cannot be resized'
: resize === 'horizontal'
? 'Resize horizontally only'
: resize === 'vertical'
? 'Resize vertically only'
: 'Resize in both directions'"
/>
</div>
</template>API ​
Pass-through: <div> ​
What does this mean?
All props, events, and attrs that are not specified in the tables below will be passed to the element/component described above.
Props ​
| Name | Type | Description |
|---|---|---|
resize | TextAreaResize= "both" | |
textareaClass | HTMLAttributeClass | |
id | string | |
topText | string | |
bottomText | string | |
iconLeft | "function" | "address-card" | "adls2" | "ai-chat-insights" | "ai-mascot-color" | "ai-mascot-disabled" | "ai-mascot-glasses-color" | "ai-mascot" | "ai-monitor-hai-sparkle" | ... 469 more ... | |
iconRight | "function" | "address-card" | "adls2" | "ai-chat-insights" | "ai-mascot-color" | "ai-mascot-disabled" | "ai-mascot-glasses-color" | "ai-mascot" | "ai-monitor-hai-sparkle" | ... 469 more ... | |
disabled | boolean= false | |
isInvalid | boolean= false | |
ariaDescribedby | string | |
required | Booleanish | |
name | string | |
form | string | |
wrap | string | |
placeholder | string | |
autofocus | Booleanish | |
maxlength | Numberish | |
minlength | Numberish | |
readonly | Booleanish | |
autocomplete | string | |
cols | Numberish | |
dirname | string | |
rows | Numberish | |
modelValue | string |
Events ​
| Name | Parameters | Description |
|---|---|---|
@update:modelValue | [value: string | undefined] |
Slots ​
| Name | Scoped | Description |
|---|---|---|
#iconLeft | {} | |
#iconRight | {} |
Exposed ​
| Name | Type | Description |
|---|---|---|
textareaRef | HTMLTextAreaElement | null | |
focus | () => void | |
blur | () => void | |
select | () => void |