Textarea
Textarea
Section titled “Textarea”<ax-textarea> is a multi-line text input. It shares the same CVA contract and inputVariants size
ramp as Input, so it works with [(value)], [(ngModel)], and reactive
forms.
Import
Section titled “Import”import { AxTextareaComponent } from '@axisui-ng/forms';<ax-textarea [(value)]="bio" [rows]="6" placeholder="Tell us about yourself" />
<ax-form-field label="Bio" forId="bio"> <ax-textarea id="bio" [(value)]="bio" /></ax-form-field>Variants & sizes
Section titled “Variants & sizes”| Option | Values | Default | Notes |
|---|---|---|---|
size | 'sm' | 'md' | 'lg' | 'md' | Padding / typography via shared inputVariants. |
<ax-textarea size="sm" [rows]="3" placeholder="Small" /><ax-textarea size="md" [rows]="4" placeholder="Medium" /><ax-textarea size="lg" [rows]="6" placeholder="Large" />Inputs & models
Section titled “Inputs & models”| Input | Type | Default | Notes |
|---|---|---|---|
value | model<string | null> | null | Two-way value ([(value)]); also CVA. |
id | string | null | null | Inner <textarea> id — match a FormField forId. |
size | 'sm' | 'md' | 'lg' | 'md' | Padding / typography. |
rows | number | 4 | Visible text rows. |
placeholder | string | '' | Placeholder text. |
required | boolean | false | Sets aria-required. |
readonly | boolean | false | Read-only. |
disabled | boolean | false | Disabled (also via CVA setDisabledState). |
invalid | boolean | false | Error styling + aria-invalid (OR’d with FormField wiring). |
describedBy | string | null | null | aria-describedby; explicit value wins over FormField auto-wiring. |
Accessibility
Section titled “Accessibility”Renders a native <textarea>. Associate a label via id + FormField forId, or a wrapping
<label>. Inside a FormField, aria-describedby / aria-invalid are auto-wired unless overridden.
Storybook
Section titled “Storybook”Interactive examples live in Storybook under Forms / Textarea. Run pnpm storybook to explore them.