# Feedback key

A feedback form that is a key until you press it. At rest it is one kit key, “Feedback”, the size of any other, so it drops in where a button that opens a modal would sit. Pressed, it grows where it stands, from its own corner, into the kit’s panel plate: the question with a close key, five rating lamps with a word for the one picked, a note box whose placeholder follows the rating, and Send, which stays off until a rating is chosen. It is not a modal: there is no backdrop and the page stays usable. A failed send keeps the panel open with the reason beside a red lamp in the Send row and Send ready again.

Kit part · With the Kit · https://tactileui.dev/parts/feedback-key

> The code and styling for this part come with the Tactile UI Kit, which the Pass and the Founder Pass include. Sign in if you have it. Sign in: https://tactileui.dev/auth/sign-in The price: https://tactileui.dev/pricing

## Anatomy

The key is the kit key.

## Variants

- At rest
- Open, nothing picked
- Picked and typed
- Sending
- Sent
- Failed

## States

- At rest
- Open
- Typed
- Sending
- Sent
- Failed

## Props and options

| Name | Kind | Description |
| - | - | - |
| question | attribute | The panel’s title, and its accessible name. |
| label · thanks | attribute | What the key says at rest (Feedback), and for three seconds after a send (Thanks). The key keeps its rest width; give a longer line only where there is room. The status line always says “Thanks, we read every note”. |
| align | attribute | Grow the panel leftwards from the key’s right edge. It does this on its own when there is no room to the right, and always stays inside the page less a gutter. |
| opens | attribute | Which way the panel grows from the key: from its top edge, or from its bottom edge. |
| max | attribute | The most characters in the note; the count under it says how many are left once you type. |
| placeholder | attribute | One placeholder for every rating, instead of the built-in line for each. |
| feedbackWord() · feedbackPlaceholder() · feedbackLeft() · feedbackKeyHTML() | function | The word for a rating, the placeholder for one, the characters left, and the drawn markup. |

## Usage notes

Press Feedback: the key grows into the panel and the focus lands on the rating. Pick a lamp: Send wakes up and the note’s placeholder changes with the rating. Type a few words and watch the characters left.

## Accessibility

- Keyboard: Tab reaches the key; Enter or Space opens the panel and the focus lands on the rating; the arrow keys pick a lamp; Tab goes on to the note, then Send; Escape (or the close key) folds the panel back and puts the focus on the key.
- The key carries aria-expanded and aria-controls for the panel. The panel is a labelled group named by its question, not a dialog: it takes no focus trap and the page behind it stays reachable.
- The rating is the kit’s radio group: each lamp is named in words (“Good, 4 of 5”), so the picked word is heard as well as seen. Send is aria-disabled until one is chosen, so a screen reader can still find it.
- A polite status line says every result: Sending, the thanks, or the error. The error is also written beside a red lamp in the Send row, so it is never told by colour alone; the note keeps its neutral edge, since the words are fine.
- While it sends the panel is aria-busy, the rating and note are held, and the Send key shows the kit spinner beside the word Sending.
- Under reduced motion the panel swaps with no growth.

## Related parts

- [Rating](https://tactileui.dev/parts/rating): A row of indicator lamps, each in its own round recess, lit up to your score. It is a native radio group underneath, so arrows, Space, the label and the form all work with no script; a number is printed under each lamp, so the score is never told by colour alone. A read-only row shows a score someone else gave.
- [Popover](https://tactileui.dev/parts/popover): A card hung from the key that opened it, with a printed leader running back to the key. Not modal: the page stays live around it.
- [Survey card](https://tactileui.dev/parts/survey-card): One question on a small plate: tick boxes under it, a Submit key and an X to close. Ticking “other” bares a one-line field. Submit stays dark until something is ticked. After Submit the card says thank you in its own place and shuts itself. It is the kit’s own Panel, Check, Field and Key, unchanged.
- [Spinner](https://tactileui.dev/parts/spinner): A ring of eight lamps lit in turn, a chase round a dial: each lamp is a dim cap with its light laid over it, and the light fades as the chase passes on, leaving a short tail. Only the light’s opacity moves. Amber, the lamp for work in hand. Under reduced motion it holds still on one lit lamp at the top, and the words still say it is busy.
