Skip to content

Interface: ThumbsFeedbackBlockProps

Defined in: src/UI/blocks/thumbsFeedback.tsx:67

Thumbs feedback component for user feedback collection. Displays two buttons (thumbs up and thumbs down) that users can click to provide feedback.

Param

Configuration object

Param

Name of the thumbs feedback component in the state

Param

Callback function called when thumbs up is clicked

Param

Callback function called when thumbs down is clicked

Param

Whether the component is disabled

Param

Additional CSS class name

Examples

Basic usage

thumbsFeedback({
  name: 'userFeedback',
  onThumbsUpClick: () => console.log('Thumbs up!'),
  onThumbsDownClick: () => console.log('Thumbs down!')
});

Usage with disabled state

thumbsFeedback({
  name: 'feedback',
  disabled: true,
  onThumbsUpClick: () => {},
  onThumbsDownClick: () => {}
});

Usage inside a group for feedback in success states

bubble([
  group([
    completion({
      title: 'Task completed successfully',
      description: 'All operations have been completed.'
    }),
    thumbsFeedback({
      name: 'feedback',
      onThumbsUpClick: async () => {
        await ctx.telemetry?.sendEvent('THUMBS_FEEDBACK', {
          feedback: 'ThumbsUpFeedback'
        });
      },
      onThumbsDownClick: async () => {
        await ctx.telemetry?.sendEvent('THUMBS_FEEDBACK', {
          feedback: 'ThumbsDownFeedback'
        });
      }
    })
  ])
]);

Extends

  • Omit<ThumbsFeedbackProps, "resolve">

Properties

PropertyTypeDescriptionInherited fromDefined in
resolve?booleanWhether the component should resolve the UI when a button is clicked. Defaults to true.-src/UI/blocks/thumbsFeedback.tsx:70
name?stringOptional name for state managementOmit.namesrc/assistant-ui/components/mw/ThumbsFeedback/types.ts:8
onDismissClick?() => voidCallback when dismiss is clickedOmit.onDismissClicksrc/assistant-ui/components/mw/ThumbsFeedback/types.ts:10
onThumbsUpClick?() => voidCallback when thumbs up is clickedOmit.onThumbsUpClicksrc/assistant-ui/components/mw/ThumbsFeedback/types.ts:12
onThumbsDownClick?() => voidCallback when thumbs down is clickedOmit.onThumbsDownClicksrc/assistant-ui/components/mw/ThumbsFeedback/types.ts:14
disabled?booleanWhether the component is disabledOmit.disabledsrc/assistant-ui/components/mw/ThumbsFeedback/types.ts:16
className?stringCustom CSS class nameOmit.classNamesrc/assistant-ui/components/mw/ThumbsFeedback/types.ts:18
buttonTexts?{ dismiss?: string; }Button textsOmit.buttonTextssrc/assistant-ui/components/mw/ThumbsFeedback/types.ts:22
buttonTexts.dismiss?string--src/assistant-ui/components/mw/ThumbsFeedback/types.ts:23

Matterway Assistant SDK Documentation