Recommendation Card

Agent suggestion with a confidence meter and actions.

Installation

pnpm dlx shadcn@latest add @ward/recommendation-card

Add the Ward registry to components.json once:

"registries": {
  "@ward": "https://ward.so/r/{name}.json"
}

Or install from the URL with no configuration: npx shadcn@latest add https://ward.so/r/recommendation-card.json

Usage

import RecommendationCard from "@/components/ward/RecommendationCard";
<RecommendationCard
  labels={{ title: "Apply this fix?" }}
  options={[
    { key: "patch", body: "Patch the null check in the session handler.", short: "Patch the null check", signal: 3, tone: "var(--green)", label: "High confidence", cta: "Apply", ctaVariant: "default" },
    { key: "revert", body: "Revert the last deploy.", short: "Revert the last deploy", signal: 1, tone: "var(--orange)", label: "Needs review", cta: "Revert", ctaVariant: "default" },
  ]}
/>

Props

PropTypeDefaultDescription
optionsRecommendationOption[]OPTIONSOptions to choose between, with the first shown as the recommendation and the rest listed under Alternatives.
labelsPartial<RecommendationLabels>-Overrides for the card title, the Alternatives button, the drawer heading and the accepted state.
variantstring"Default"Accepted for registry parity; RecommendationCard has no visual variants.

Ward · Version 1.1.0 · Registry manifest