About
Agent suggestion card with inline entity and value chips, a confidence meter, an alternatives drawer and accept action.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Recommendation Card to your project and fits it to your theme.
Code
How Recommendation Card is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import RecommendationCard, { EntityChip, ValuePill, type RecommendationOption } from "@/components/ui/recommendation-card";
/* all content lives here; the component only renders what it is given */
const OPTIONS: RecommendationOption[] = [
{
key: "scale",
body: (
<>
Add two nodes to <EntityChip name="api-prod-east" color="#6366f1" /> before traffic peaks in{" "}
<ValuePill tone="success">40 min</ValuePill>
</>
),
short: "Scale api-prod-east by 2 nodes",
signal: 3,
tone: "success",
label: "High confidence",
cta: "Scale now",
ctaVariant: "accent",
},
{
key: "cache",
body: (
<>
Raise the edge cache TTL to <ValuePill>10 minutes</ValuePill> for read-heavy endpoints.
</>
),
short: "Raise edge cache TTL to 10 min",
signal: 2,
tone: "warning",
label: "Needs review",
cta: "Configure",
},
{
key: "none",
body: (
<>
Keep the current capacity and <span className="font-medium text-foreground">alert on-call</span> if p95 latency crosses 400 ms.
</>
),
short: "Keep capacity, alert on-call",
signal: 0,
tone: "neutral",
label: "No signal",
cta: "Set alert",
},
];
export default function RecommendationCardDemo() {
return (
<div className="flex min-h-[520px] w-full items-center justify-center bg-background p-8">
<RecommendationCard
title="Want me to scale the cluster ahead of the spike?"
options={OPTIONS}
onAccept={(option) => console.log("accept:", option.key)}
/>
</div>
);
}
















