React - Answer Widget

Use the SearchstaxAnswerWidget to add AI answers to a React or Next.js search page. Configure when Read More appears, optional feedback controls, and a custom answer template.

Usage

<SearchstaxAnswerWidget
              showShowMoreAfterWordCount={100}
              feedbackConfig={feedbackConfig}
            ></SearchstaxAnswerWidget>

Props

  • showShowMoreAfterWordCount – number (default 100) that determines after how many words the UI displays a "Read More" view.
  • feedbackWidget – an optional object that configures thumbs-up and thumbs-down feedback functionality.
  • searchAnswerTemplate – template override as explained below

Example

For a complete example, see sitesearch-ux-react.

Articles in this section