Textarea
The Textarea component allows users to input and edit multi-line text.
Import
<script>
import { Textarea } from 'svelte-fluentui';
</script>
svelte
Basic Usage
<Textarea label="Comments" />
svelte
With Placeholder
<Textarea label="Description" placeholder="Enter your description here..." />
svelte
Custom Size
<Textarea label="Large text area" rows={10} />
svelte
Properties
Property | Type | Default | Description |
---|---|---|---|
label | string | undefined | Label text for the textarea |
value | string | '' | Current value of the textarea |
placeholder | string | undefined | Placeholder text |
rows | number | 3 | Number of visible text lines |
disabled | boolean | false | Whether the textarea is disabled |
required | boolean | false | Whether the field is required |
Events
Event | Description |
---|---|
on:input | Fired when the textarea value changes |
on:focus | Fired when the textarea gains focus |
on:blur | Fired when the textarea loses focus |