TextAreaField
TextAreaField manages multi-line textual comments, descriptions, notes, and addresses with character counters (showCount) and maximum length constraints.
Props & Configuration
7 propsComplete property specifications, parameter types, and default fallbacks.
| Property | Type | Default | Description |
|---|---|---|---|
| idRequired | string | — | Form state key name. |
| control | Control<any> | — | React Hook Form control instance. |
| label | string | — | Field label. |
| placeholder | string | — | Placeholder text. |
| rows | number | 4 | Initial visible row height. |
| maxLength | number | — | Maximum character limit. |
| showCount | boolean | false | Shows current character count and limit. |
Interactive Examples & Live Previews
2 DemosEvery example includes its own live, interactive preview element alongside the corresponding copyable TypeScript snippet.
Basic Multi-line Description
Standard text area for remarks and notes.
1import React from "react";2import { useForm } from "react-hook-form";3import { TextAreaField } from "antd-dynamic-ui";45export default function BasicTextArea() {6 const { control } = useForm();7 return (8 <div className="max-w-md">9 <TextAreaField10 id="notes"11 control={control}12 label="Order Notes"13 placeholder="Add delivery instructions or gate code..."14 rows={4}15 />16 </div>17 );18}
Complete Props with Character Counter
Text area with 500-char limit, character counter, and custom rows.
1import React from "react";2import { useForm } from "react-hook-form";3import { TextAreaField } from "antd-dynamic-ui";45export default function CompleteTextArea() {6 const { control } = useForm();7 return (8 <div className="max-w-md">9 <TextAreaField10 id="justification"11 control={control}12 label="Project Justification"13 placeholder="Explain budget justification for audit approval..."14 rows={6}15 maxLength={500}16 showCount={true}17 tooltip="Submitted to Finance review board"18 required={true}19 />20 </div>21 );22}
Frequently Asked Questions & Quick Solutions
Architectural patterns, React 19 compatibility, and integration tips for TextAreaField.
How does TextAreaField integrate with Ant Design 5.x and Next.js 15?▼
TextAreaField is designed as an enhanced, declarative wrapper for Ant Design. It fully supports Next.js 15 App Router when using @ant-design/nextjs-registry, eliminating SSR hydration mismatches and guaranteeing 0ms layout thrashing.
Can I customize validation, themes, and props for TextAreaField?▼
Yes. Every prop is fully typed in TypeScript 5 with comprehensive Intellisense. You can pass custom styling via className or style props, configure global Ant Design themes via ConfigProvider, and extend validation logic seamlessly.