ProFormText
Basic text input field component.Import
Usage
Props
Extends all Ant Design Input props.Field name for form submission and data binding.
Label text displayed above the input field.
Placeholder text shown when the input is empty.
Props passed directly to the underlying Ant Design Input component. Supports all Input props including:
maxLength: Maximum character lengthprefix: Prefix icon or elementsuffix: Suffix icon or elementaddonBefore: Element before inputaddonAfter: Element after inputdisabled: Whether the input is disabledreadOnly: Whether the input is read-only
Width of the input field:
xs: 104px - Short numbers, short textsm: 216px - Names, phone, IDmd: 328px - Standard fields (default)lg: 440px - Longer fields, URLs, tagsxl: 552px - Long text, descriptionsnumber: Custom pixel width
Validation rules from Ant Design Form. Common rules:
required: Field is requiredpattern: Regular expression validationmin/max: Length validationvalidator: Custom validation function
Whether the input is disabled.
Whether the field is in read-only mode. In read-only mode, displays value as text instead of input.
Tooltip displayed next to the label. Can be a string or Ant Design Tooltip props.
Transform value when getting from form. Used to format data from form to component format.
Transform value when submitting form. Used to format data from component to submission format.
Additional props passed to Form.Item wrapper. Supports all Ant Design Form.Item props.
Internal props for ProField component. Controls field rendering behavior:
mode: Display mode (‘read’ | ‘edit’ | ‘update’)
ProFormText.Password
Password input field with visibility toggle and optional strength indicator.Import
Usage
- Basic
- With Strength
Props
Extends ProFormText props and Ant Design Input.Password props.Custom render function for password strength indicator. Displays in a popover when focused.
Additional hint text displayed below the strength indicator in the popover.
Props for the strength indicator popover. Accepts Ant Design Popover props.
Whether to show the password visibility toggle icon.
Custom render function for the visibility toggle icon.
ProFormTextArea
Multi-line text input component.Import
Usage
Props
Extends ProFormText props and Ant Design Input.TextArea props.Number of visible text lines.
Auto-resize height based on content. Can specify min and max rows.
Maximum character length.
fieldProps.showCount
boolean | ((args: { value: string, count: number, maxLength?: number }) => ReactNode)
Whether to show character count. Can provide custom render function.
Whether to show clear button when input has value.
ProFormDigit
Numeric input component with format support.Import
Usage
- Basic
- Decimal
Props
Extends ProFormText props and Ant Design InputNumber props.Minimum value allowed.
Maximum value allowed.
Number of decimal places. Set to 0 for integers only.
Increment/decrement step when using arrow buttons.
Custom format function for display value.
Parse function to convert display value back to number.
Prefix content displayed before the number.
Suffix content displayed after the number.
Whether to show increment/decrement controls. Can customize icons.
Whether to enable keyboard behavior for up/down keys.
Enable high precision decimals support. Returns string value instead of number.