ProForm API
ProForm extends Ant Design’s Form with enhanced field components and layouts optimized for CRUD operations.ProFormProps
Extends all Ant Design Form properties with additional enhancements.Callback when form is submitted successfully.Return
true to keep the loading state and prevent form reset. Return false or void to auto-reset.Callback when form submission fails validation.
Configuration for submit/reset buttons. Set to
false to hide.Format dates before submission.
"string"- Format as YYYY-MM-DD"number"- Format as timestampfalse- No formattingfunction- Custom formatter
Enable grid layout for form items.
Column props for grid layout (only when
grid is enabled).Row props for grid layout (only when
grid is enabled).Load initial form values from remote.
Parameters for the request. Changes trigger reload.
Enable form submission on Enter key press.
Loading state for the form.
Auto focus the first input field.
Sync form values to URL query parameters.
Sync initial values when they change.
Omit null and undefined values from submission.
ProFormFieldItemProps
Common props for all ProForm field components.Field name for form value binding.
Field label.
Tooltip for the field label.
Placeholder text for the input.
Field width.
xs= 104pxsm= 216pxmd= 328pxlg= 440pxxl= 552px
Props passed directly to the underlying input component.
Props for the Form.Item wrapper.
Validation rules (same as Ant Design Form.Item rules).
Whether the field is required.
Disable the field.
Render field in readonly mode.
Hide the field.
Column props for this specific field (when grid layout is enabled).
Secondary field (only for LightFilter).
Show clear button.
Show border for the input.
Number of columns the field occupies.
Parameters for remote data request (for Select, Cascader, etc.).
Load remote data for Select/Cascader/TreeSelect fields.
Value enum for Select/Radio/Checkbox fields.
Debounce time for request in milliseconds.
Don’t wrap field in Form.Item (advanced usage).
Convert value when getting from form.
Transform value before form submission.
ProFormGroup
Group multiple form fields together.Group title.
Form fields in the group.
Space between fields.
Label layout for fields in the group.
Whether the group is collapsible.
Controlled collapsed state.
Default collapsed state.
Extra content in the group header.
Enable grid layout (inherits from ProForm if not set).
Column props for grid layout.
Row props for grid layout.
Field Components
ProFormText
Text input field.ProFormTextArea
Textarea input field.Number of rows.
Maximum length.
Show character count.
ProFormDigit
Numeric input field.Minimum value.
Maximum value.
Number of decimal places.
ProFormSelect
Select dropdown field.Static options.
Load options from remote.
Value enum for options.
Selection mode.
Enable search.
ProFormDatePicker
Date picker field.Date format.
Show time selection.
ProFormDateRangePicker
Date range picker field.Date format.
ProFormCheckbox
Checkbox field.Checkbox options (for checkbox group).
ProFormRadio
Radio field.Radio options.
Radio style.
ProFormSwitch
Switch field.Content when checked.
Content when unchecked.
ProFormRate
Rate field.Number of stars.
Allow half stars.
ProFormSlider
Slider field.Minimum value.
Maximum value.
Step value.
Tick marks.
ProFormCascader
Cascader field.Cascader options.
Load options from remote.
ProFormTreeSelect
Tree select field.Tree data.
Load tree data from remote.
ProFormUploadButton / ProFormUploadDragger
File upload fields.Upload URL.
File list display type.
Maximum number of files.
Form Layouts
ModalForm
Form in a modal dialog.Element to trigger modal open.
Ant Design Modal props.
Modal title.
Modal width.
Callback when modal visibility changes.
DrawerForm
Form in a drawer.Element to trigger drawer open.
Ant Design Drawer props.
Drawer width.
QueryFilter
Compact query form layout.Controlled collapsed state.
Default collapsed state.
Callback when collapse state changes.
Show divider between sections.
LightFilter
Inline lightweight filter form.Dropdown placement.
Custom render for dropdown footer.
Usage Examples
- Basic Form
- Grid Layout
- Modal Form