Widget

Customization

Customize widget appearance with custom CSS classes and text labels.

Custom CSS classes

Override the default widget styles using the classNames prop:

<FeedbackProvider
  apiKey={process.env.NEXT_PUBLIC_FF_API_KEY!}
  classNames={{
    button: "my-custom-button",
    popover: "my-custom-popover",
    textarea: "my-custom-textarea",
  }}
>
  {children}
</FeedbackProvider>

Available classNames keys

KeyDescription
buttonThe floating action button
popoverThe comment popover container
textareaThe feedback text input
pinFeedback pins on the page
overlayThe annotation overlay
successStateSuccess message after submission
errorStateError message on failure
feedbackListThe feedback list panel
feedbackListItemIndividual items in the feedback list

Custom labels

Override the default text strings using the labels prop:

<FeedbackProvider
  apiKey={process.env.NEXT_PUBLIC_FF_API_KEY!}
  labels={{
    submitButton: "Send feedback",
    cancelButton: "Cancel",
    textareaPlaceholder: "Describe the issue...",
    successMessage: "Feedback submitted",
  }}
>
  {children}
</FeedbackProvider>

The labels prop accepts partial overrides — only specify the strings you want to change.

Available labels keys

KeyDefault
submitButton"Submit"
cancelButton"Cancel"
textareaPlaceholder"Describe the issue..."
successMessage"Feedback sent"
closeButton"Close"
retryButton"Retry"
errorMessage"Something went wrong"
deleteConfirm"Delete this feedback?"
deleteButton"Delete"
editButton"Edit"
saveButton"Save"
showResolved"Show resolved"
hideResolved"Hide resolved"
feedbackListTitle"Feedback"
emptyList"No feedback on this page"