Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Dialog examples · Standard

Feedback Dialog for React

A feedback dialog with one labeled textarea for open-ended comments.

Framework
UI library

Feedback forms buried in settings never get used. This React dialog asks one open question in a Textarea, one click from anywhere in the app. It's shadcn.io's Dialog on Base UI with the textarea in a Field.

Preview

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.

FAQ

Should I limit the length?

A maxLength of one or two thousand characters keeps submissions reasonable; show the count in a FieldDescription if you set one.

Should the text be required?

Disable Submit Feedback while the textarea is empty, so people don't send blank feedback by accident.

Should I add categories or a rating?

For routing, a select for Bug, Feature request or Other helps. Keep the form short; the point is that it's quick.

Can people attach screenshots?

Yes, with a file input or the File Upload component. Limit the size and show a preview.

Anonymous or identified?

If people are signed in, attach their account so you can follow up; otherwise offer an optional email.

What happens after submitting?

Close the dialog from your handler and thank people with a toast. Pass open and update it in onOpenChange, which receives the new boolean.