For the complete documentation index, see llms.txt
Saltar al contenido principal

Layout

The feedback widget accepts HTML attributes to control its position, style, rating mode, and visibility options.

Usage​

After installing the widget, set attributes on <feedback-button>:

<feedback-button project="YOUR_PROJECT_ID" button-style="dark" hide-icon="true">Feedback</feedback-button>

Properties​

Use HTML attribute names below. The Docusaurus plugin uses camelCase names.

PropertyDescription
projectRequired
Type: string

The project ID.
api-keyType: string
Default value: ""

Required when the project has Require an API key for submissions enabled. Use a key scoped to feedback_create only: see API key security.
button-positionType: string
Default value: default
Available values: default, bottom-right, bottom-left, top-right, top-left, center-right, center-left

Position of the button. Use center-right or center-left to display the button as a vertical tab attached to the edge of the screen.
button-styleType: string
Default value: default
Available values: default, dark, light

Style of the button.
click-outside-closeType: boolean
Default value: true

Whether clicking outside the feedback modal closes it. Any message typed by the user is kept, so an accidental click does not discard their input. Also applies to the screenshot editor, where clicking outside returns to the feedback form. See Accessibility.
custom-fontType: boolean
Default value: false

When set to true, the Inter font will not be loaded. Use your site's font instead.
embeddedType: boolean
Default: false

On <feedback-modal> only. Show the form in the page without a trigger, close button, or backdrop.
email-addressType: string

Initial value for the email input field.
escape-closeType: boolean
Default value: true

Available on <feedback-modal> directly. Whether pressing Esc closes the feedback modal. Like clicking outside, any message typed by the user is kept. Also applies to the screenshot editor. Set to false if your site already binds Esc to something else. See Accessibility.
hide-emailType: boolean
Default value: false

Whether to hide the email input.
hide-iconType: boolean
Default value: false

Whether to hide the button icon.
hide-mobileType: boolean
Default value: false

When set to true, hides the feedback button on mobile devices.
hide-privacy-policyType: boolean
Default value: true

Whether to hide the privacy policy checkbox.
hide-ratingType: boolean
Default value: false

Whether to hide the ratings input.
hide-screenshot-buttonType: boolean
Default value: false

Whether to hide the screenshot button.
history-closeType: boolean
Default value: true

Whether pressing the browser back button while the feedback modal is open closes it instead of navigating away. Especially useful on mobile, where going back is the natural way to dismiss an overlay.
is-email-requiredType: boolean
Default value: false

When set to true, users must provide an email address to submit feedback. Tip: Remember to also update the email-placeholder property to remove "(optional)" from the text when using this option.
metadataType: string
Default value: ""

A string attached to feedback, such as a JSON-encoded product version or user role.
screenshot-positioningType: boolean
Default value: false

For an inline button, shows a page-positioning step before capturing a screenshot. Fixed buttons keep the direct capture flow.
modal-positionType: string
Default value: center
Available values: center, sidebar-right, sidebar-left, top-right, top-left, bottom-right, bottom-left, center-right, center-left

Position of the feedback modal.
ratingType: number
Default value: -1 (neutral)

Rating selected by default. Available values: stars mode: 1...5. thumbs mode: 0 dislike and 1 like. -1 means neutral in both modes.
rating-modeType: string
Default value: thumbs

Available values: thumbs, stars

Type of rating system.
recaptcha-textType: string
Default value: This form is protected by reCAPTCHA and the Google <a href="https://policies.google.com/privacy" target="_blank" rel="noopener noreferrer">Privacy Policy</a> and <a href="https://policies.google.com/terms" target="_blank" rel="noopener noreferrer">Terms of Service</a> apply.

Text displayed in the footer when reCAPTCHA is enabled. Supports a limited set of HTML tags (a, b, br, code, em, i, p, small, span, strong, u) and attributes (href, target, rel, title).
session-idType: string
Default value: Autogenerated

Identifies a session. Set a custom value to associate feedback with an existing session.
submitType: boolean
Default: false

When the button is clicked, submits a rating without opening the modal. If no rating is provided, it submits a neutral rating (-1).
privacy-policy-textType: string
Default value: I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.

Privacy policy text.

Examples​

Replace YOUR_PROJECT_ID with the ID from Projects > your project > Snippet.

Change the button style​

<feedback-button project="YOUR_PROJECT_ID" button-style="light">Feedback</feedback-button>

Create a floating button​

<feedback-button project="YOUR_PROJECT_ID" button-position="center-right" modal-position="sidebar-right" button-style="dark">Feedback</feedback-button>

Add the widget to any button​

<feedback-button project="YOUR_PROJECT_ID" button-position="default">
<button type="button">Report a problem</button>
</feedback-button>

Like / dislike buttons​

Each button opens the form with the selected rating. Set submit="true" to submit a rating immediately without opening the form.

<feedback-button project="YOUR_PROJECT_ID" rating="1" button-position="default">Helpful</feedback-button>
<feedback-button project="YOUR_PROJECT_ID" rating="0" button-position="default">Not helpful</feedback-button>

Change modal position​

<feedback-button project="YOUR_PROJECT_ID" modal-position="sidebar-left">Feedback</feedback-button>

Prefill email​

<feedback-button project="YOUR_PROJECT_ID" email-address="[email protected]">Feedback</feedback-button>

Enable privacy policy​

<feedback-button project="YOUR_PROJECT_ID" hide-privacy-policy="false" privacy-policy-text="I agree to the &lt;a href='https://example.com/privacy'&gt;privacy policy&lt;/a&gt;.">Feedback</feedback-button>

Enable stars rating​

<feedback-button project="YOUR_PROJECT_ID" rating-mode="stars">Feedback</feedback-button>