Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Recommendation Card

ProNew

Agent suggestion card with a segmented confidence meter, impact badges, and Accept/Dismiss actions that fold into a receipt.

Installation

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

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
title*string

Primary action the agent recommends.

—
rationale*string

Short supporting rationale.

—
confidence*number

Numeric confidence between 0 and 100.

—
entitystring

Optional entity badge, e.g. "Cone King · 7d lead".

—
impactstring

Optional impact tag, e.g. "+$4,200/mo".

—
acceptLabelstring

Label for the accept button.

"Accept"
onAccept() => void

Called when accepted.

—
onDismiss() => void

Called when dismissed.

—
classNamestring—

Accessibility

  • Confidence bar uses role=meter with min, max, and current value.
  • Once accepted or dismissed, the decision is announced through a status region.
  • Layout folding and segment entrance respect prefers-reduced-motion.