Last updated

feedback

Customize how your users leave feedback about the content of your documentation project with the feedback option. By default, the feedback sentiment form displays at the bottom of all Markdown and API reference pages, but you can customize or hide it.

Options

OptionTypeDescription
hidebooleanSpecifies if the feedback form is hidden. Default value: false
typestringSpecifies the type of feedback form displayed. Possible values:sentiment, rating, comment, mood, scale. Default value: sentiment
settingsSettings objectAn object with the list of specific settings for each feedback form type.

Settings object

OptionTypeDescription

label

string

Text for the message displayed with the feedback form. Default value depends on the feedback form type.

Default value for the sentiment, rating, mood, and scale feedback form types: "Was this helpful?"

Default value for the comment feedback form type: "Please share your feedback with us."

submitText

string

Text for message that appears when users submit the feedback form.

Default value for the sentiment, rating, mood and scale feedback form types: "Thank you for your feedback!"

Default value for the comment feedback form type: "Thank you for helping improve our documentation!"

commentComment objectList of optional settings for a comment form that displays after users submit initial feedback. Not applicable for the comment feedback form type.
reasonsReasons objectList of optional settings for a reasons form that displays after users submit initial feedback. Not applicable for the comment feedback form type.
leftScaleLabelstringText for the label of the left-hand side of the scale to explain what lower numbers mean on the rating system. Applicable only for the scale feedback form type. Default value: "Not helpful at all"
rightScaleLabelstringText for the label of the right-hand side of the scale to explain what higher numbers mean on the rating system. Applicable only for the scale feedback form type. Default value: "Extremely helpful"

Comment settings

OptionTypeDescription
hidebooleanEnable or disable comment option. Default value: false.
labelstringText for the message that displays with the comment feedback form field. Applicable only for the rating and scale feedback form type. Default value: "Please share your feedback with us."
likeLabelstringText for the message that displays with the comment feedback form when users select the like icon. Applicable only for the sentiment feedback form type. Default value: "What was most helpful?"
dislikeLabelstringText for the message that displays with the comment feedback form when users select the dislike icon. Applicable only for the sentiment feedback form type. Default value: "What can we improve?"
satisfiedLabelstringText for the message that displays with the mood feedback form when users select the satisfied icon. Applicable only for the mood feedback form type. Default value: "What was most helpful?"
neutralLabelstringText for the message that displays with the mood feedback form when users select the neutral icon. Applicable only for the mood feedback form type. Default value: "What can we improve?"
dissatisfiedLabelstringText for the message that displays with the mood feedback form when users select the dissatisfied icon. Applicable only for the mood feedback form type. Default value: "What can we improve?"

Reasons settings

OptionTypeDescription
hidebooleanEnable or disable reasons option. Default value: false.
labelstringText for the message that displays with the reasons feedback form. Default value: "Which statement describes your thoughts about this page?"
componentstringUse multiple-choice checkboxes or single-choice radio buttons. Possible values:checkbox, radio. Default value: checkbox.
items[string]REQUIRED with component. List of choices included in the feedback form. For example, "Content was accurate" or "Content was confusing".

Examples

Configuration for the feedback option added to the redocly.yaml file updates all pages globally. You can also configure the feedback option for individual pages in the front matter. Front matter configurations take precedence, but if an option's setting is not configured in the front matter but is configured in the redocly.yaml file, it applies.

Configuration for the feedback option must be added under the openapi or graphql property for API reference documentation pages.

Sentiment

The sentiment feedback form displays by default on Markdown and OpenAPI and GraphQL API reference documentation pages. No configuration is required. If you do not want to display a feedback form on your Markdown and OpenAPI and GraphQL API reference pages, you can configure it to be hidden.

Configuration:

redocly.yaml
feedback:
  type: sentiment
  settings:
    label: Do you like our page?
    submitText: Thanks for your feedback!
    reasons:
      component: radio
      label: Tell us more about the page.
      items:
        - The content has great examples.
        - The content is thoroughly detailed.
    comment:
      likeLabel: What was most helpful?
      dislikeLabel: What can we improve?

Screenshot of what users see after selecting the thumbs-up icon:

Sentiment feedback form with advanced options

Mood

Configuration:

redocly.yaml
feedback:
  type: mood
  settings:
    label: Do you like our page?
    submitText: Thanks for your feedback
    reasons:
      label: Check all boxes that apply.
      items:
        - The content was useful.
        - The content was accurate.
        - The content was easy to find.
    comment:
      satisfiedLabel: What did you like best?
      neutralLabel: How can we improve?
      dissatisfiedLabel: What needs improvement?

Screenshot of what users see after they select the neutral-face icon:

Mood

Scale

Configuration:

feedback:
  type: scale
  settings:
    label: Do you like our page?
    submitText: Thanks for your feedback!
    leftScaleLabel: Not helpful
    rightScaleLabel: Very helpful

Screenshot:

Scale

Star rating

Configuration:

feedback:
  type: rating
  settings:
    label: How many stars for this page?
    submitText: Thank you for your stars!

Comment

Configuration:

feedback:
  type: comment
  settings:
    label: Please leave a couple of words here about your experience.
    submitText: Your comment has been sent to our team!
  • Discover the different ways you can customize code samples in your documentation in the codeSnippet.
  • Learn how to configure feedback for GraphQL reference documentation.

Resources