Skip to content

HyTextArea

A versatile multi-line text input component with enhanced styling and functionality. Supports validation states, auto-resizing, character limits, and comprehensive accessibility features. Provides a consistent interface for various text area scenarios with built-in error handling.

Examples

html
<hy-text-area label="Comments" placeholder="Enter your comments..."></hy-text-area>
html
<hy-text-area
  label="Description"
  helper-text="Provide a detailed description"
  rows="6"
  maxlength="500"
  required
>
</hy-text-area>
html
<hy-text-area label="Feedback" value="This is existing feedback" size="large" auto-resize>
</hy-text-area>

Events

  • input - Fired when the text area value changes, includes current value
  • change - Fired when the text area loses focus after a value change, includes current value
  • focus - Fired when the text area receives focus
  • blur - Fired when the text area loses focus

Methods

focus()

Sets focus on the text area.

blur()

Removes focus from the text area.

select()

Selects all text in the text area.

Built with Lit. Documented with VitePress.