Smart recommendation preview

Smart recommendation

Suggestion card with a confidence signal, alternatives to switch to and accept with undo

  • Group
    Agents
  • Origin
    Copied · affectUI · source
  • License
    MIT
  • Added
    Oct 18
npx shadcn@latest add @deank/smart-recommendation

The registry stays private. Install from the repo with a GitHub token — see the README.

Usage

import { SmartRecommendation } from "@/registry/components/smart-recommendation/smart-recommendation";

<SmartRecommendation options={[/* … */]} />

Props

NameTypeDefaultDescription
optionsRecommendation[]The first is recommended, the rest are alternatives – id, label, reason and signal (0–3)
onAccept(option) => voidCalled when an option is accepted
onUndo(option) => voidCalled when an accept is undone
defaultOpenbooleantrueStarts with the reason visible
titlestring"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).

Related

Decision inbox · Email draft