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

Deal Card

ProNew

A deal on a pipeline board: value, owner, close date, the next step, and a warning when it is overdue or has gone quiet. The chance of closing runs along the bottom edge.

Installation

pnpm dlx shadcn@latest add @viewport/deal-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

The deal's name.

—
hrefstring

Makes the name a link to the deal.

—
company*string—
value*string

The amount, already formatted, e.g. "$48,000".

—
owner{ name: string; src?: string }

Who owns the deal. Their avatar is shown, with their name for screen readers.

—
closeDatestring

The expected close date, already formatted.

—
overdueboolean

The close date has passed. It is marked in color and in words.

—
probabilitynumber

The chance of winning, from 0 to 100.

—
nextStepstring

What happens next, e.g. "Send the security questionnaire".

—
stalestring

A warning that nothing has happened for a while, e.g. "No activity for 12 days".

—
tagsstring[]—
actionsReact.ReactNode

A menu or buttons in the top corner.

—
liftedboolean

The card is being moved: it lifts and tilts slightly.

—

Accessibility

  • An article named with the deal, the company and the value.
  • Overdue and stale are written out as well as colored.
  • The probability is also text for screen readers.
  • The whole card is the link's target, with actions kept above it.