TextArea
Textarea allows users to enter text in multiple lines.
Beta Component
This component is still a work in progress and is subject to change. Use with caution as
breaking changes may occur.
You're doing it wrong!
<script lang="ts">
import { TextArea } from 'stwui';
let value: string | undefined;
let error: string | undefined = "You're doing it wrong!";
$: if (value && value.length > 0) {
error = undefined;
} else {
error = "You're doing it wrong!";
}
</script>
<TextArea name="text-area-1" placeholder="Basic" />
<TextArea name="text-area-2">
<TextArea.Label slot="label">Label</TextArea.Label>
</TextArea>
<TextArea name="text-area-3" {error} bind:value>
<TextArea.Label slot="label">Label</TextArea.Label>
</TextArea>
TextArea Props
name | string | |
error | string | undefined | |
placholder | string | undefined | |
value | string | undefined | |
autocomplete | 'on' | 'off' | undefined | |
autocapitalize | 'off' | 'none' | 'sentences' | 'words' | 'characters' | off |
readonly | true | undefined |
TextArea Slots
label | <TextArea.Label slot="label" /> |
TextArea.Label Slots
default |