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.

The feedback option also supports page-level configuration using front matter.

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. For sentiment and mood, if configured, this label is applied to every reaction specific configuration as the default label. 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. For sentiment and mood, if configured, this component is applied to every reaction specific configuration as the default component.
items[string]List of choices included in the feedback form. For example, "Content was accurate" or "Content was confusing". For sentiment and mood, if configured, these items are included in every reaction specific configuration as default items.
likeValue specific reasons objectOptional settings for reasons; only displayed if users select the like icon. Applicable only for the sentiment feedback form.
dislikeValue specific reasons objectOptional settings for reasons; only displayed if users select the dislike icon. Applicable only for the sentiment feedback form.
satisfiedValue specific reasons objectOptional settings for reasons; only displayed if users select the satisfied icon. Applicable only for the mood feedback form.
neutralValue specific reasons objectOptional settings for reasons; only displayed if users select the neutral icon. Applicable only for the mood feedback form.
dissatisfiedValue specific reasons objectOptional settings for reasons; only displayed if users select the dissatisfied icon. Applicable only for the mood feedback form.

Value-specific reasons object

OptionTypeDescription
hidebooleanEnable or disable the reasons option for a specific feedback value. Overrides the main Reasons settings hide option. If not specified, the Reasons settings hide option is used. Default value: false.
labelstringText for the message that displays with the reasons feedback form for a specific feedback value. Overrides the main Reasons settings label option. If not specified, the Reasons settings label option is used. Default value: "Which statement describes your thoughts about this page?"
componentstringUse multiple-choice checkboxes or single-choice radio buttons. Possible values:checkbox, radio. Overrides the main Reasons settings component option. If not specified, the Reasons settings component option is used. Default value: checkbox.
items[string]List of choices included in the feedback form for a specific feedback value. Merged with the Reasons settings items option. 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
      items:
        - The page is clear, but not very engaging.
      like:
        label: Tell us more about the page.
        items:
          - The content has great examples.
      dislike:
        label: Tell us what happened.
        items:
          - The content misses practical examples.
    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:
      component: radio
      satisfied:
        label: Check all boxes that apply.
        items:
          - The content was accurate.
      neutral:
        hide: true
        label: Tell us more about the page.
        items:
          - The content misses practical examples.
      dissatisfied:
        label: Tell us what happened.
        items:
          - The content was hard to find.

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