Lead Score
ProNewA score in a ring that fills when it appears, with Hot, Warm or Cold beside it. Pressing it lists what added and took away points.
Installation
pnpm dlx shadcn@latest add @viewport/lead-score
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
| Prop | Type | Default |
|---|---|---|
| score* | numberThe score, from 0 to 100. | — |
| factors | { label: string; points: number }[]What moved the score, each with its points. Shown when the score is pressed. | — |
| warmAt | numberThe scores at which a lead counts as warm and as hot. | 40 |
| hotAt | number | 70 |
| size | "sm" | "md" | "md" |
| className | string | — |
Accessibility
- Named with the score, its scale and its band.
- The band is a word as well as a color.
- The reasons open in a popover from a button, not on hover.
- The ring is shown filled under reduced motion.