Feedback · Feedback
Feedback
Quick feedback component

Demos

How to import

Feedback Supported since 2.85.0.

Basic usage

Use visible to set whether to display or not. The default feedback display content is in emoji form. The currently selected content can be obtained through onValueChange.

Text type

Set type to text to get feedback in the form of a multi-line input box, and set the parameters of the multi-line input box through textAreaProps.

Single choice feedback

Set type to radio to get feedback in the form of a single selection, and set the parameters of the radio selection through radioGroupProps.

Multiple choice feedback

Set type to checkbox to obtain feedback in the form of multiple selections, and set the parameters of the multi selection through checkboxGroupProps.

Customized feedback content

Set type to custom to obtain feedback in the form of multiple selections, and set the feedback content through renderContent. When using custom feedback, you need to control whether the submit button is disabled or not. Users can set it through okButtonProps.
The form of feedback can be passed through mode, the default is popup, set to modal to get the display in the form of modal dialog box.

Feedback completion tips

After the feedback is completed, you can switch to display information to remind the user that the feedback has been completed.

API reference

In addition to the parameters listed below, when mode is modal, FeedbackProps also supports the parameters in ModalProps. When mode is popup, FeedbackProps also supports the parameters in SideSheetProps
PropertiesInstructionstypeDefault
cancelButtonPropsSet the parameters for the cancel buttonButtonProps-
checkboxGroupPropsSet parameters for multiple selectionsCheckBoxGroupProps-
radioGroupPropsSet radio parametersRadioGroupProps-
renderContentCustomized feedback content display(content: ReactNode) => ReactNode-
ModalPropsWhen mode is modal, it is used to set modal parameters.ModalProps-
modeDisplay mode, supports popup and modalbooleanpopup
okButtonPropsSet the parameters of the submit button. For example, when customizing content, set disabled in okButtonProps to disable submissionButtonProps-
onCancelCancel callback, the parameter is the shutdown function, and it will automatically close after the promise is resolved.(e: any) => void | Promise<any>-
onOkClick OK callback, the parameter is the closing function, and it will automatically close after the promise is resolved.(e: any) => void | Promise<any>-
onValueChangeCallback when feedback content changesfunction(value: string | string[] | Object)
SideSheetPropsWhen modal is popup, it is used to set the parameters of the internal SideSheetSideSheetProps-
typeType of feedback content, supports text, emoji, radio, checkbox, custombooleanemoji
textAreaPropsSet parameters of multi-line input boxTextAreaProps-