Textarea
Native multi-line control that grows with content.
beta
Examples
Message
<script lang="ts">
import Textarea from '@tcpsystems/ui/foundation/Textarea';
import Stack from '@tcpsystems/ui/foundation/Stack';
let deploymentNote = $state('');
const uid = $props.id();
</script>
<Stack>
<label for={uid}>Deployment note</label>
<Textarea id={uid} bind:value={deploymentNote} rows={4} placeholder="Describe what changed in this deployment" />
</Stack>With character count
0 of 200
<script lang="ts">
import Field from '@tcpsystems/ui/foundation/Field';
import Stack from '@tcpsystems/ui/foundation/Stack';
import Textarea from '@tcpsystems/ui/foundation/Textarea';
const uid = $props.id();
let value = $state('');
</script>
<Stack>
<label for={uid}>Release description</label>
<Textarea id={uid} rows={3} bind:value={value} describedby={`${uid}-count`} />
<Field mode="count" id={`${uid}-count`} {value} max={200} />
</Stack>API
import Textarea from '@tcpsystems/ui/foundation/Textarea';| Prop | Type | Default |
|---|---|---|
kind? | 'mono' | none |
describedby? | string | none |
invalid? | 'true' | none |
value? | native | $bindable() |
| Hook | Kind |
|---|---|
.tcp-textarea | Root class |
data-kind | Data attribute |