Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Feedback Prompt Multi-Action Banner Block for React

A thumbs vote for a feature-flag tool that opens an optional comment box in place, with a Shine Button Send feedback, a ghost Skip and a thank-you line that replaces the vote.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A vote with an optional follow-up for React with Base UI, for a feature you are trying out on part of your audience. Hatchfield's card sits between the page's solid rails with a flask icon, a heading and a sentence at the start and two toggle buttons at the end, "Useful" and "Not for me", each with an icon. Pressing one marks it and opens a comment area under a hairline, in place: a labelled textarea, a Shine Button "Send feedback" and a ghost "Skip". Sending or skipping closes the area and replaces the vote buttons with a thank-you line that takes focus; pressing the chosen vote again takes the vote back and closes the area. It's built from Button, Field, Textarea and Guides with your theme's tokens for every colour; a pressed vote is foreground, so the primary stays on Send. For experiments, beta features and any one-tap feedback that can grow into a note.

FAQ

How do the vote buttons work for assistive technology?

They are two buttons with aria-pressed, inside a fieldset named by the heading, so a screen reader says "Useful, toggle button, pressed". Pressing the pressed one releases it. Because they are separate buttons, a vote can be taken back without a dedicated control, and both are plain Tab stops.

How does the comment area open without shifting the page?

The area is a row in a CSS grid that eases from 0fr to 1fr, so the card grows by about 170 pixels over 300 ms; the content below the block moves with it, since the card is part of the page flow. Closed, the area is invisible and inert, so its textarea and buttons are out of the tab order and out of the accessibility tree. With reduced motion it opens at once.

What does Skip do?

It sends the vote without a comment: the area closes and the thank-you line says "Thanks, your vote is counted." Send feedback sends the vote with the note and says "Thanks, your note is with the team." (or the vote line when the box is empty). Neither is wired to a server: put your request in send and skip, using vote and comment.

Where does focus go after sending?

The buttons are inert once sent, so focus moves to the thank-you line, which is a polite status that screen readers read out. The next Tab carries on after the card. Opening the area does not move focus: the person who voted is still on the vote button and can Tab into the comment.

Why are the votes outline buttons and Send the only Shine Button?

A vote is a choice, not the page's main action, so the buttons are outline and turn foreground when pressed. Send feedback is the one forward action, and only it is a Shine Button.

How does it fit on a phone?

The votes drop under the text, indented to line up with it, and the comment area's buttons stack at full width. With the area open the card is about 400 pixels tall at 320 pixels wide, and nothing scrolls sideways. In a right-to-left layout everything mirrors.

  • Pro

    A one-question survey for a dashboard redesign: a five-point scale of joined cells that answers in place with Thanks, 4 of 5, then an optional one-line comment.

  • Pro

    An early-access signup for a design studio: a labelled email field with the Shine Button inside it, a validation message, a polite success line and a ghost Remind me later.

  • Pro

    Feedback FAQ

    Votes and reactions

    A centred FAQ for a scheduling app: seven accordion rows whose open answers end in a Was this helpful? foot with Yes and No, reason chips after a No, and a polite thank-you.

  • Pro

    A reading-preferences prompt for a reading app: three toggles with a live preview that changes size, weight and border, a polite count, and Save, Reset and Not now.

  • Pro

    An acknowledge-once callout for a newsletter platform: a card in card with an info icon, a heading, one sentence and a footer whose checkbox rewrites the outline button from Got it to Dismiss permanently.

  • Pro

    A card-in-card call to action built on a rating summary: a headline and a Shine Button over a band with a big score and foreground stars beside a five-to-one star histogram, all figures worked out from the counts.