Textarea Components

Examples

<script>
import { Textarea } from 'flowbite-svelte'
let textareaprops = {
  id: 'message',
  name: 'message',
  label: 'Your message',
  rows: 4,
  placeholder: 'Leave a comment...',
};
</script>

<Textarea {...textareaprops} />

Props

The component has the following props, type, and default values. See types page for type information.

Name Type Default
value string ''
id string generateId()
name string 'message'
label string 'Your message'
rows number 4
ref HTMLElement null
placeholder string 'Leave a comment...'
labelClass string 'block mb-2 text-sm font-medium text-gray-900 dark:text-gray-400'
textareaClass string 'block p-2.5 w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500'
helper string ''
helperClass string 'mt-2 text-sm text-gray-500 dark:text-gray-400'

References