Textarea

A multi-line text input field for longer text content.

Examples

Default

<c-textarea placeholder="Type your message here." class="max-w-sm"></c-textarea>

Disabled

<c-textarea
  placeholder="Type your message here."
  disabled
  class="max-w-sm"
></c-textarea>

With Rows

<c-textarea
  placeholder="Type your message here."
  rows="5"
  class="max-w-sm"
></c-textarea>

API Reference

Textarea

A multi-line text input field for longer text content.

Prop Type Default Description
textarea-classes string '' Additional CSS classes to apply to the textarea
placeholder string '' Placeholder text
value string '' The textarea value
disabled boolean false Whether the textarea is disabled
readonly boolean false Whether the textarea is read-only
rows number - Number of visible text rows
cols number - Number of visible text columns
maxlength number - Maximum number of characters allowed
aria-label string '' Accessible label for screen readers
aria-describedby string '' ID of element that describes the textarea
aria-invalid string '' Indicates whether the textarea value is invalid

Events

Event Detail Description
valuechange {{ '{' }} value: string {{ '}' }} Fired when the textarea value changes