Skip to content
pandacoderz/ui

Feedback Bar

Inline prompt asking whether a response was helpful, with action and close slots.

Was this response helpful?

Installation

npx shadcn@latest add https://ui.spencerwueste.com/r/feedback-bar.json

Usage

import {
  FeedbackBar,
  FeedbackBarAction,
  FeedbackBarActions,
  FeedbackBarClose,
  FeedbackBarContent,
  FeedbackBarLabel,
  FeedbackBarPrompt,
} from "@/components/pandacoderz-ui/feedback-bar";
<FeedbackBar>
  <FeedbackBarContent>
    <FeedbackBarPrompt>
      <FeedbackBarLabel>Was this response helpful?</FeedbackBarLabel>
    </FeedbackBarPrompt>
    <FeedbackBarActions>
      <FeedbackBarAction asChild tooltip="Good">
        <Button variant="ghost" size="icon-sm">…</Button>
      </FeedbackBarAction>
    </FeedbackBarActions>
    <FeedbackBarClose tooltip="Dismiss">
      <Button variant="ghost" size="icon-sm">…</Button>
    </FeedbackBarClose>
  </FeedbackBarContent>
</FeedbackBar>

API Reference

FeedbackBarAction

Prop Type Description
asChild boolean Merge into the child element.
tooltip string | { content, side, shortcut } Tooltip content and optional keyboard hint.

FeedbackBarClose

Same props as FeedbackBarAction, rendered with a left border and always asChild.