# Forecast

> The sales forecast against quota per rep, team or month: won, commit and best case stacked in one bar, the quota as a line, attainment and the gap in words.

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

The sales forecast against quota per rep, team or month: won, commit and best case stacked in one
bar, the quota as a line, attainment and the gap in words.

- A total row is added when there is more than one row (`total` turns it on or off).
- Each bar has a text alternative with all four amounts.

## Example

```tsx
import { Forecast, Panel } from "@twentyfirstmedia/pro";
import { REPS } from "./_sales";

export default function Preview() {
  return (
    <Panel title="Q4 forecast" subtitle="New business · ends Dec 31">
      <Forecast rows={REPS} />
    </Panel>
  );
}
```

## Props

### Forecast

| Prop | Type | Notes |
| --- | --- | --- |
| `rows` | `ForecastRow[]` | Required |
| `currency?` | `string` |  |
| `total?` | `boolean` | Adds a total row (default when there is more than one row). |
| `label?` | `string` | Accessible name (default "Forecast"). |
| `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. |
