# DocsFeedback

> The quiet "Was this helpful?" closing a docs page, as a plain form that posts without JavaScript: picking Yes or No reveals an optional note and the send button through CSS alone, and the server answers by rendering the same component in its `sent` state.

```ts
import { DocsFeedback } from "@sdxc/ui/docs";
```

Renders the vote form, or the thank-you once `state` is `sent`. The form posts
`helpful=yes|no`, `page` and an optional `note` to `action`; the thank-you is a live
status so a reader on a screen reader hears it after an enhanced submit.

## Examples

```tsx
<DocsFeedback action="/docs/feedback" page="/docs/alerts" state={sent ? "sent" : "idle"} labels={labels} />
```

```tsx
<DocsFeedback frame="feedback" resetScroll="manual" action="/docs/feedback" page="/docs/alerts" labels={labels} />
```

## Props

| Prop | Type | Description |
| --- | --- | --- |
| `action` | `string` | URL the form posts to. |
| `page` | `string` | Identifier of the page, posted in the `page` field; usually its path. |
| `labels` | `Labels` |  |
| `state?` | `"idle" \| "sent"` |  |
| `frame?` | `string` | The named frame the vote reloads (`data-rmx-target`), so a page that renders this block inside `<Frame name>` swaps in the thank-you without reloading the page. |
| `resetScroll?` | `"manual" \| "after-transition"` | `"manual"` keeps the reader where they are when the vote's response renders, instead of the scroll reset a navigation does by default (`data-rmx-reset-scroll`). |

Also accepts everything in `Omit<TagProps<"div">, "children">`.


## Types

| Name | Values | What it decides |
| --- | --- | --- |
| `State` | `"idle" \| "sent"` | `idle` asks the question; `sent` thanks the reader in place of the form. |
