sterling-svelte  1.0.12
A modern, accessible, lightweight UI component library for Svelte.
Exciting News! sterling-svelte 2.0 is out and built on Svelte 5! Read all about it here!

Textarea

A <textarea>: an interactive element to accept multi-line text from the user

Code
<script lang="ts">
  import { TextArea } from '@geoffcox/sterling-svelte';

  let value : string = '';
</script>

<TextArea bind:value resize="none" />

Members

Property Name Type Default Comment
autoHeight boolean false When true, the text area will resize itself vertically to fit text.
resize TextAreaResize 'none' Sets the resize handle direction.
variant string '' Additional class names to apply

Considerations

  • Includes HTMLTextAreaElement props, event, and methods

Anatomy

<div class="sterling-text-area">
  <textarea />
</div>