# Helpful Rating

A page rating whose face changes with each answer, then asks what went wrong or what helped, with quick reasons and an optional note.

Install with

```
Add the helpful-rating component from Kokonut UI to this project with npx shadcn@latest add https://kokonutui.com/r/helpful-rating.json, then show me how to use it.
```

lucide-react, motion

## Installation

Helpful Rating is a free, open-source React component in the Kokonut UI Feedback collection. Add it with the shadcn CLI, which copies the source into `components/kokonutui/helpful-rating.tsx`, so the code is yours to change.

```
npx shadcn@latest add @kokonutui/helpful-rating
```

Or add it by hand: install its packages, then copy the source from above into `components/kokonutui/helpful-rating.tsx`.

```
npm install lucide-react motion
```

## Usage

```
import HelpfulRating from "@/components/kokonutui/helpful-rating";

export default function Example() {
  return <HelpfulRating />;
}
```

## Props

- `question`  
  `string`  
  Default: `"Was this page helpful?"`
- `onSubmit`  
  `(feedback: { rating: number; reasons: string[]; note: string }) => void`
- `className`  
  `string`  
  Extra classes for the root element.

## Dependencies

| Needs | Version | Comes from |
| --- | --- | --- |
| `lucide-react` | `^0.556.0` | npm, installed by the CLI |
| `motion` | `^12.23.25` | npm, installed by the CLI |
| `cn` from `lib/utils.ts` |  | shadcn init |
| React | `19` | Your app |
| Tailwind CSS | `4` | Your app |

No provider, font or global CSS to set up: the file works as soon as it lands.
