# Feedback

The `Feedback` component is a widget for collecting user feedback. It provides a rating system with optional comments and integrates with the backend API for submitting feedback. Results are available in the [Mission Control app](/mission-control/feedback.md).

### Preview

<div align="left"><figure><img src="/files/wlloepTrjVvTAbrvrh4S" alt="Gravity feedback component" width="261"><figcaption></figcaption></figure></div>

### Usage

```javascript
import { Feedback } from 'components/lib';

function MyComponent({ ...props }) {
  return (
    <div>
      <Feedback />
    </div>
  );
}
```

### Notes

* The `Feedback` component uses the `Popover`, `PopoverTrigger`, `PopoverContent`, `Form`, `Button`, `Icon`, and `ViewContext` from `'components/lib'`.
* The `Feedback` component manages its own state for displaying the rating and comments form.
* The `icons` array defines the icons and colors for the different rating options.
* The `saveRating` function sets the selected rating and shows the comments form.
* The `Form` component is used to submit feedback to the backend API.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.usegravity.app/gravity-web/components/feedback.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
