We use cookies to ensure you get the best experience on our website. Read our privacy policy

Skip to main content

Directory

TextArea Component

The TextArea component provides a robust solution for multi-line text input in forms. Built with accessibility and flexibility in mind, it offers customizable styling, validation states, and seamless integration with your design system.

  • Check Circle

    Accessible Design: Built-in labels and ARIA support

  • Check Circle

    Multiple Variants: Default and underline styles

  • Check Circle

    Validation States: Support for required fields and error states

  • Check Circle

    Auto-resizing: Height adjusts to content while remaining user-resizable

The standard style with a bordered container:

Message
<TextArea
variant="default"
label="Message"
placeholder="Enter your message here"
/>

A minimal style with bottom border only:

Minimal Input
<TextArea
variant="underline"
label="Minimal Input"
placeholder="Clean, understated design"
/>
TextArea Component Props Extends <textarea> HTMLElement
Prop Type Default Description
label string Label text shown above the textarea
subLabel string Helper text shown below the textarea
variant default | underline default Visual style of the textarea
Required Message *
<TextArea
label="Required Message"
required
placeholder="This field cannot be empty"
/>
Your BioMaximum 500 characters
<TextArea
label="Your Bio"
subLabel="Maximum 500 characters"
placeholder="Tell us about yourself"
/>
Disabled Input
<TextArea
label="Disabled Input"
disabled
placeholder="This field cannot be edited"
/>
  1. Labels and Instructions

    • Always provide clear, descriptive labels
    • Use sub-labels for additional context
    • Keep placeholder text minimal
  2. Validation and Feedback

    • Clearly indicate required fields
    • Provide immediate validation feedback
    • Use appropriate error messages

Limited Time Launch Sale

Start building accessible, beautiful forms today with our AstroJS starter template. Get instant access to the TextArea component and many more pre-built UI elements.

GET 60% OFF!
North Star Themes Logo

Subscribe to our newsletter

Get the latest AstroJS tips and tricks right to your inbox

Email: [email protected]

© 2025 North Star Themes

Web Kit Provided By North Star Themes