TextArea
Textarea allows the user to enter and edit multiline text.
Usage
<script>
import { TextArea } from 'fluentui-svelte';
</script>
<TextArea placeholder="Type your message here..." /> Shape
Set shape to rounded (default) or square.
Placeholder
The placeholder prop sets the placeholder text for the textarea, providing a hint to users about what to enter.
Resize
The resize prop controls whether the textarea can be resized by the user. It can be set to none, both, horizontal, or vertical. This allows you to control the resizing behavior of the textarea.
On Change
The onChange event is triggered whenever the content of the textarea changes. This can be used to react to user input in real-time, such as validating input or updating other parts of the UI.
Component Props
| Name | Type | Default | Description |
|---|---|---|---|
shape | Exclude<Shapes, 'circular'> | 'rounded' | Shape of the input surface, including its border and focus indicator. |
value bindable | string | '' | The current value of the textarea. |
ref bindable | HTMLTextAreaElement | null | The DOM reference of the textarea element. | |
placeholder | string | The placeholder text for the textarea. | |
resize | 'none' | 'both' | 'horizontal' | 'vertical' | 'vertical' | Configures the resize behavior of the textarea. |
disabled | boolean | false | Disables the user interaction. |
wrapperAttributes | HTMLAttributes | The attributes to spread on the wrapper element. | |
wrapperRef bindable | HTMLDivElement | null | The DOM reference of the wrapper element. | |
SvelteHTMLElements['textarea'] |

