
Usage
import { SmartRecommendation } from "@/registry/components/smart-recommendation/smart-recommendation";
<SmartRecommendation options={[/* … */]} />Props
| Name | Type | Default | Description |
|---|---|---|---|
| options | Recommendation[] | The first is recommended, the rest are alternatives – id, label, reason and signal (0–3) | |
| onAccept | (option) => void | Called when an option is accepted | |
| onUndo | (option) => void | Called when an accept is undone | |
| defaultOpen | boolean | true | Starts with the reason visible |
| title | string | "Smart recommendation" | Heading of the card |
When to use
- Suggesting the next step an app or assistant thinks is best – with a way out - Settings people rarely change but should get a nudge on, like sync modes or plans
When not to use
Lists of results (use a table or cards).