Feedback morph
ProA feedback button that becomes a form, then a thank-you, in one shape.
Live · keyboard ready
Deploy previews now build in about 40 seconds
Every pull request gets its own preview URL. Builds reuse the dependency cache from main, so most previews are ready before review starts.
Previews expire 14 days after the branch merges. Pin one from the deployment page to keep it longer.
How do deploy previews feel?
Thanks, we read every note
- Quick in-context feedback on a page or feature without interrupting the task.
- Mood plus note feedback where a five point scale is enough.
- Use dialog with form fields when you need contact details, attachments, or required fields.
- Use rating for a standalone star score.
- Use popover for arbitrary anchored content.
Installation
Pro source and install commands unlock with a Pro plan.
example.tsx
import { FeedbackMorph } from "@/components/arc/feedback-morph/feedback-morph"; export function PageFeedback() { return ( <FeedbackMorph side="top" onSubmit={async ({ mood, message }) => { await fetch("/api/feedback", { method: "POST", body: JSON.stringify({ mood, message }) }); }} /> );}FeedbackMorph
A "Send feedback" pill that springs open into a small panel with mood faces and a note, folds into a thank-you pill once sent, then back into the button.
PropTypeDefaultDescription
labelstring"Send feedback"The pill's label.titlestring"How is it going?"Question at the top of the panel.moods{ value: string; label: string; icon: ReactNode; prompt: string }[]defaultFeedbackMoodsMood faces; five read best, three or more work. prompt replaces the placeholder once that mood is picked.placeholderstring"Tell us what you think"Prompt in the empty note before a mood is picked.maxLengthnumber500Character limit of the note.successLabelstring"Thanks, we read every note"Text in the success pill.onSubmit(feedback: { mood: string | null; message: string }) => void | Promise<unknown>–Receives the note. Return a promise to hold the sending state; a rejection keeps the panel open with an error and the draft intact.resetAfternumber3200Milliseconds the success pill stays before folding back into the button.side"bottom" | "top""bottom"Whether the panel grows down from the pill or up from it.align"start" | "center" | "end""center"Horizontal anchor of the growing panel.classNamestring–Class on the root element.- Arrow keys
- Move between mood faces.
- HomeorEnd
- Select the first or last mood.
- Cmd/Ctrl+Enter
- Send the note from the textarea.
- Escape
- Fold the panel back into the pill, keeping the draft.
- The pill has aria-haspopup="dialog" and aria-expanded; the panel is role="dialog" labelled by its title.
- Moods form a role="radiogroup" of role="radio" buttons with a roving tabindex.
- Sending, errors, and success are announced through a polite status region; the send button exposes aria-keyshortcuts.
- One shape springs between pill, panel, and thank-you pill sizes; content fades in a beat behind the edge and a check mark draws itself on success.
- A mood highlight slides between faces, a character counter rolls, and an empty send shakes.
- Reduced motion keeps every state but lands transforms at once and uses short opacity fades.
- The panel is min(22rem, 100vw minus 2rem), so it fits phones; use side and align to keep it inside the viewport near edges.
- Mood buttons are 2.75rem targets, and hover highlights follow the mouse only.
- Two ResizeObservers measure the pill and panel so one shape can spring between them.
- The panel mounts only while open; there is no work while idle.
Notes for AI
Give your coding assistant the Markdown reference instead of screenshots.
- Use for quick in-context feedback where a dialog would interrupt the task. Use a dialog with form fields when you need contact details, attachments, or required fields.
- Return the fetch promise from onSubmit so the sending and error states work; pass custom moods to change the scale.
The full library index for assistants is at /llms.txt.