# Lead Score

> A 0 to 100 score as a ring with a grade: hot from 70, warm from 40, otherwise cold (hot and warm move the thresholds).

Component · CRM · Pro kit · [Live page](https://ui.twentyfirst.media/pro/components/LeadScore/)

A 0 to 100 score as a ring with a grade: hot from 70, warm from 40, otherwise cold (`hot` and
`warm` move the thresholds).

- With `reasons` the score becomes a button that opens what added or took points.

## Example

```tsx
import { LeadScore, Panel } from "@twentyfirstmedia/pro";

export default function Preview() {
  return (
    <Panel
      title="Lead score"
      subtitle="Hot, warm and cold, with the reasons"
      style={{ maxWidth: 520 }}
    >
      <div className="tf-row" style={{ gap: 12 }}>
        <LeadScore
          score={86}
          reasons={[
            { text: "Visited the pricing page 4 times", points: 24 },
            { text: "Opened the last 3 emails", points: 18 },
            { text: "Company with 50–200 people", points: 15 },
            { text: "No reply for 10 days", points: -6 },
          ]}
        />
        <LeadScore score={54} />
        <LeadScore score={18} />
      </div>
    </Panel>
  );
}
```

## Props

### LeadScore

| Prop | Type | Notes |
| --- | --- | --- |
| `score` | `number` | 0–100. |
| `reasons?` | `{ text: string; points: number }[]` | What raised or lowered the score: `{ text: "Opened 3 emails", points: 12 }`. |
| `hot?` | `number` | Score from which a lead counts as hot (default 70) and warm (default 40). |
| `warm?` | `number` |  |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### Panel

| Prop | Type | Notes |
| --- | --- | --- |
| `side?` | `boolean` |  |
| `title?` | `string` |  |
| `subtitle?` | `string` |  |
| `action?` | `ReactNode` |  |
| `children?` | `ReactNode` |  |
| `surface?` | `Surface` | `"glass"`: translucent glass over what is behind (maps, 3D, video, photos); `"solid"` opts out inside a glass `UIProvider`. |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |
