CrudForm API
API reference docs for the React CrudForm component. Learn about the props, CSS, and other APIs of this exported module.
Demos
Import
import { CrudForm } from '@toolpad/core/Crud';| Name | Type | Default | Description |
|---|---|---|---|
| formState* | { errors: object, values: object } | - | Form state object, including field values and errors. |
| onFieldChange* | func | - | Callback fired when a form field is changed. |
| onSubmit* | func | - | Callback fired when the form is submitted. |
| submitButtonLabel* | string | - | Text for form submit button. |
| dataSource | object | - | Server-side data source. |
| onReset | func | - | Callback fired when the form is reset. |
| slotProps | { textField?: object } | {} | The props used for each slot inside. |
| slots | { textField?: elementType } | {} | The components used for each slot inside. See Slots API below for more details. |
The component cannot hold a ref.
| Slot name | Class name | Default component | Description |
|---|---|---|---|
| textField | TextField | The text field component used in the form. |
Source code
If you did not find the information in this page, consider having a look at the implementation of the component for more detail.