Skip to contentSkip to content

PromptField API

API reference docs for the React PromptField component. Learn about the props, CSS, and other APIs of this exported module.

Demos

Import

import { PromptField } from '@mui/x-data-grid-premium/components';
// or
import { PromptField } from '@mui/x-data-grid-premium';

Learn about the difference by reading this guide on minimizing bundle size.



The top level Prompt Field component that provides context to child components. It renders a <div /> element.

Props

Required

Called when the user submits the prompt.

Type:func

Signature:
function(prompt: string) => void
  • prompt The prompt

Override or extend the styles applied to the component.

Type:func
| string


Called when an speech recognition error occurs.

Type:func

Signature:
function(error: string) => void
  • error The error message

A function to customize rendering of the component.

Type:element
| func


The ref is forwarded to the root element.

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.