Skip to contentSkip to content

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';

Props

NameTypeDefaultDescription
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.

dataSourceobject-

Server-side data source.

onResetfunc-

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.

Slots

Slot nameClass nameDefault componentDescription
textFieldTextFieldThe 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.