Skip to content

Textarea

Textarea

Multi-line text input component for entering longer text content.

Import

import { Textarea } from '@primitivekit/vue';

Basic Usage

<Textarea>Content</Textarea>

Props

No props available.

Customization

The Textarea component supports CSS variables for complete customization:

<Textarea style={{
  '--textarea-bg-color': '#007bff',
  '--textarea-text-color': '#ffffff'
}}>Custom</Textarea>

Design Tokens

The following design tokens are available for customization:

  • --textarea-wrapper-display
  • --textarea-wrapper-width
  • --full-width
  • --textarea-padding-top
  • --textarea-padding-y
  • --textarea-padding-right
  • --textarea-padding-x
  • --textarea-padding-bottom
  • --textarea-padding-left
  • --textarea-border-width
  • … and 50 more

Accessibility

The Textarea component is fully accessible and follows WCAG 2.1 AA standards:

  • ✅ Semantic HTML elements
  • ✅ Keyboard accessible
  • ✅ Focus visible indicator
  • ✅ Proper ARIA attributes
  • ✅ Screen reader compatible
  • ✅ Touch target size (44x44px minimum)
  • ✅ Color contrast compliance

Keyboard Navigation

KeyAction
TabMove focus to/from component
EnterActivate component
SpaceActivate component

Related Components

  • Button - Interactive button component with multiple variants, sizes, and states for triggering actions.
  • Input - Text input field component with validation, icons, and various input types.
  • Select - Dropdown component for selecting one or multiple options from a list.
  • Checkbox - Form input component for selecting one or multiple options from a set.
  • Radio - Form input component for selecting a single option from a set of mutually exclusive choices.

See Also