Feedback Bar
nexus-ui/feedback-barFreeComponent
Feedback prompt bar for per-message or thread ratings with action and close slots
Live preview
live · rendered by the registry
Rendered by nexus-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://nexus-ui.dev/r/feedback-bar.jsonSource
1import * as React from "react";2import { Slot } from "@radix-ui/react-slot";34import { cn } from "@/lib/utils";5import { Kbd } from "@/components/ui/kbd";6import {7 Tooltip,8 TooltipContent,9 TooltipProvider,10 TooltipTrigger,11} from "@/components/ui/tooltip";1213type FeedbackBarTooltip =14 | string15 | {16 content?: string;17 side?: "top" | "right" | "bottom" | "left";18 shortcut?: string;19 };2021type FeedbackBarProps = React.HTMLAttributes<HTMLDivElement>;2223function FeedbackBar({ className, ...props }: FeedbackBarProps) {24 return (25 <div26 data-slot="feedback-bar"27 role="group"28 aria-label="Feedback bar"29 className={cn(30 "inline-flex h-12 w-full max-w-110 rounded-xl border dark:border-accent bg-card text-sm",31 className,32 )}33 {...props}34 />35 );36}3738type FeedbackBarContentProps = React.HTMLAttributes<HTMLDivElement>;3940function FeedbackBarContent({ className, ...props }: FeedbackBarContentProps) {41 return (42 <div43 data-slot="feedback-bar-content"44 className={cn("flex w-full items-center justify-between", className)}45 {...props}46 />47 );48}4950type FeedbackBarPromptProps = React.HTMLAttributes<HTMLDivElement>;5152function FeedbackBarPrompt({ className, ...props }: FeedbackBarPromptProps) {53 return (54 <div55 data-slot="feedback-bar-prompt"56 className={cn(57 "flex h-full w-full items-center justify-start gap-2.5 pl-4",58 className,59 )}60 {...props}61 />62 );63}6465type FeedbackBarLabelProps = React.HTMLAttributes<HTMLSpanElement>;6667function FeedbackBarLabel({ className, ...props }: FeedbackBarLabelProps) {68 return (69 <span70 data-slot="feedback-bar-label"71 className={cn("text-sm font-[350] text-foreground", className)}72 {...props}73 />74 );75}7677type FeedbackBarActionsProps = React.HTMLAttributes<HTMLDivElement>;7879function FeedbackBarActions({ className, ...props }: FeedbackBarActionsProps) {80 return (81 <div82 data-slot="feedback-bar-actions"83 className={cn(84 "flex h-full items-center justify-center gap-1.5 px-2",85 className,86 )}87 {...props}88 />89 );90}9192type FeedbackBarActionProps = React.HTMLAttributes<HTMLDivElement> & {93 asChild?: boolean;94 tooltip?: FeedbackBarTooltip;95};9697function FeedbackBarAction({98 asChild = false,99 tooltip,100 className,101 ...props102}: FeedbackBarActionProps) {103 const Comp = asChild ? Slot : "div";104 const { content, side, shortcut } =105// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from nexus-ui
All 15 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Attachmentsattachments | nexus-ui | Components | Free | 4 deps · 2 files | |
| Chain of Thoughtchain-of-thought | nexus-ui | Components | Free | 2 deps · 2 files | |
| Citationcitation | nexus-ui | Components | Free | 4 deps | |
| Imageimage | nexus-ui | Components | Free | 2 deps | |
| Messagemessage | nexus-ui | Components | Free | 9 deps · 2 files | |
| Model Selectormodel-selector | nexus-ui | Components | Free | 3 deps | |
| Prompt Inputprompt-input | nexus-ui | Components | Free | 1 dep | |
| Questionsquestions | nexus-ui | Components | Free | 2 deps |
