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

PropertyTypeDefaultDescription
labelstringundefinedLabel text for the textarea
valuestring''Current value of the textarea
placeholderstringundefinedPlaceholder text
rowsnumber3Number of visible text lines
disabledbooleanfalseWhether the textarea is disabled
requiredbooleanfalseWhether the field is required

Events

EventDescription
on:inputFired when the textarea value changes
on:focusFired when the textarea gains focus
on:blurFired when the textarea loses focus