Last updated

feedback

Customize how users leave feedback about your documentation content 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 default configuration includes an email field for anonymous users to provide their email with the feedback.

The optional email input field is not displayed for logged-in users.

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

Options

OptionTypeDescription
hidebooleanHides the feedback form. Default: false
typestringSets the feedback form type. Possible values: sentiment, rating, comment, mood, scale. Default: sentiment
settingsSettings objectContains specific settings for each feedback form type.

Settings object

OptionTypeDescription

label

string

Text displayed with the feedback form. Default depends on the feedback form type.

Default for sentiment, rating, mood, and scale types: "Was this helpful?"

Default for comment type: "Share your feedback with us."

submitText

string

Text displayed when users submit the feedback form.

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

Default for comment type: "Thank you for helping improve our documentation!"

commentComment objectSettings for a comment form that displays after users submit initial feedback. Not applicable for the comment feedback form type.
reasonsReasons objectSettings for a reasons form that displays after users submit initial feedback. Not applicable for the comment feedback form type.
leftScaleLabelstringLabel for the left-hand side of the scale explaining what lower numbers mean. Applicable only for the scale feedback form type. Default: "Not helpful at all"
rightScaleLabelstringLabel for the right-hand side of the scale explaining what higher numbers mean. Applicable only for the scale feedback form type. Default: "Extremely helpful"

optionalEmail

OptionalEmail object

Settings for the optional email input field in the feedback form.

Collects email addresses from anonymous users for follow-up information. For logged-in users, feedback forms automatically collect email addresses as part of the user data.

Applicable to all types of feedback forms.

Comment object

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

Reasons object

OptionTypeDescription
hidebooleanEnables or disables the reasons option. Default: false.
labelstringText displayed with the reasons feedback form. For sentiment and mood, this label applies to every reaction-specific configuration as the default. Default: "Which statement describes your thoughts about this page?"
componentstringSets the component type to multiple-choice checkboxes or single-choice radio buttons. Possible values: checkbox, radio. Default: checkbox. For sentiment and mood, this component applies to every reaction-specific configuration as the default.
items[string]List of choices in the feedback form. For example, "Content was accurate" or "Content was confusing". For sentiment and mood, these items are included in every reaction-specific configuration as defaults.
likeValue specific reasons objectSettings for reasons displayed when users select the like icon. Applicable only for the sentiment feedback form.
dislikeValue specific reasons objectSettings for reasons displayed when users select the dislike icon. Applicable only for the sentiment feedback form.
satisfiedValue specific reasons objectSettings for reasons displayed when users select the satisfied icon. Applicable only for the mood feedback form.
neutralValue specific reasons objectSettings for reasons displayed when users select the neutral icon. Applicable only for the mood feedback form.
dissatisfiedValue specific reasons objectSettings for reasons displayed when users select the dissatisfied icon. Applicable only for the mood feedback form.

Optional Email object

OptionTypeDescription
hidebooleanHides the optional email input. Setting to true removes the input. Default: false.
labelstringText displayed with the optional email input. Default: "Your email (optional, for follow-up)".
placeholderstringPlaceholder text for the optional email input. Default: "yourname@example.com".

Value-specific reasons object

OptionTypeDescription
hidebooleanEnables or disables the reasons option for a specific feedback value. Overrides the main Reasons object hide option. Uses the Reasons object hide option if not specified. Default: false.
labelstringText displayed with the reasons form for a specific feedback value. Overrides the main Reasons object label option. Uses the Reasons object label option if not specified. Default: "Which statement describes your thoughts about this page?"
componentstringSets the component type to multiple-choice checkboxes or single-choice radio buttons. Possible values: checkbox, radio. Overrides the main Reasons object component option. Uses the Reasons object component option if not specified. Default: checkbox.
items[string]List of choices 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".

Configuration precedence

Configuration for the feedback option in 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 settings from the redocly.yaml file apply when not specified in front matter.

Add the feedback option under the openapi or graphql property for API reference documentation pages.

Localization

Localize feedback form text with translations.yaml files. Don't set text values in redocly.yaml when using translations, as redocly.yaml settings override translation files.

Examples

Sentiment

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

Configuration:

redocly.yaml
feedback:
  type: sentiment
  settings:
    label: Was this page helpful?
    submitText: Thanks for your feedback!
    reasons:
      component: radio
      items:
        - The page is clear, but not very engaging.
      like:
        label: What made this page helpful?
        items:
          - The content has great examples.
      dislike:
        label: What should we improve?
        items:
          - The content lacks 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: Was this page helpful?
    submitText: Thanks for your feedback
    reasons:
      component: radio
      satisfied:
        label: Check all that apply.
        items:
          - The content was accurate.
      neutral:
        hide: true
        label: What can we improve?
        items:
          - The content lacks practical examples.
      dissatisfied:
        label: What went wrong?
        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: How helpful was this page?
    submitText: Thanks for your feedback!
    leftScaleLabel: Not helpful
    rightScaleLabel: Very helpful

Screenshot:

Scale

Star rating

Configuration:

feedback:
  type: rating
  settings:
    label: Rate this page
    submitText: Thank you for your rating!

Comment

Configuration:

feedback:
  type: comment
  settings:
    label: Share your experience with this page.
    submitText: Your comment has been sent to our team!

Optional email

feedback:
  settings:
    optionalEmail:
      label: Email address for follow-up
      placeholder: yourname@example.com
  • Discover ways to customize code samples in your documentation in the codeSnippet.
  • Learn how to configure feedback for GraphQL reference documentation.

Resources