Feedback Bar

A feedback component with thumbs up/down buttons for collecting user feedback on AI responses

Installation

Copy and paste the following code into your project.

pnpm dlx shadcn-svelte@latest add https://svelte-ai-elements.vercel.app/p/feedback-bar.json

Examples

Basic feedback bar

Was this response helpful?

With custom icon

Add a custom icon using the icon snippet prop.

Rate this AI response

Component API

FeedbackBar

FeedbackBar

PropTypeDefaultDescription
titlestring-Title text to display
iconSnippet-Custom icon snippet to display before the title
onHelpful() => void-Callback when helpful (thumbs up) button is clicked
onNotHelpful() => void-Callback when not helpful (thumbs down) button is clicked
onClose() => void-Callback when close button is clicked
classNamestring-Additional CSS classes
...propsHTMLAttributes<HTMLDivElement>-All other div props are supported