# Company

> A company with its lead score, the people and their role in the deal, the buying committee as an org chart, open deals and the timeline across all its contacts.

Pattern · Halo kit · [Live page](https://ui.twentyfirst.media/halo/patterns/CompanyScreen/)

A company with its lead score, the people and their role in the deal, the buying committee as an
org chart, open deals and the timeline across all its contacts.

## Code

```tsx
import * as React from "react";
import {
  AppShell,
  Badge,
  DealCard,
  LeadScore,
  ListRow,
  OrgChart,
  Panel,
  RecordHeader,
  RecordTimeline,
  Stagger,
} from "@twentyfirstmedia/halo";
import { CRM_NAV, ENTRIES, NOW } from "./_crm";

const two = {
  "--cols": "minmax(0, 1fr) minmax(0, 1fr)",
  "--cols-sm": "1fr",
  gap: 16,
  alignItems: "start",
} as React.CSSProperties;

/** A company in the CRM: people with their role, the buying committee, deals and the shared timeline. */
export default function Preview() {
  return (
    <AppShell
      navigation="sidebar"
      brand="Pilot CRM"
      sidebarGroups={CRM_NAV}
      active="companies"
      user={{ name: "Mara Ellis", email: "mara@pilot.app" }}
      dock={false}
    >
      <Stagger className="tf-col" style={{ gap: 16 }}>
        <RecordHeader
          kind="company"
          title="Nordhafen Outdoor"
          subtitle="Outdoor retail · 120 people · Hamburg"
          status={{ label: "Customer", tone: "success" }}
          tags={["Retail", "Key account"]}
          owner="Mara Ellis"
          menu={
            <LeadScore
              score={82}
              reasons={[
                { text: "Renewal in negotiation", points: 30 },
                { text: "4 people engaged this month", points: 20 },
              ]}
            />
          }
          actions={[
            { label: "New deal", icon: "plus", primary: true },
            { label: "Email all", icon: "mail" },
          ]}
          facts={[
            { label: "Open pipeline", value: "€78,000" },
            { label: "Won to date", value: "€126,400" },
            { label: "Website", value: "nordhafen.de" },
            { label: "Customer since", value: "Mar 2023" },
          ]}
        />
        <div className="tf-grid" style={two}>
          <Panel title="People" subtitle="4 contacts">
            <ListRow
              avatar="Lena Hartmann"
              title="Lena Hartmann"
              subtitle="Head of Operations"
              trailing={<Badge tone="success">Champion</Badge>}
            />
            <ListRow
              avatar="Henrik Sørensen"
              title="Henrik Sørensen"
              subtitle="Managing Director"
              trailing={<Badge tone="highlight">Decision maker</Badge>}
            />
            <ListRow
              avatar="Pia Krüger"
              title="Pia Krüger"
              subtitle="Purchasing"
              trailing={<Badge tone="neutral">Influencer</Badge>}
            />
            <ListRow
              avatar="Tom Becker"
              title="Tom Becker"
              subtitle="IT lead"
              trailing={<Badge tone="warning">Blocker</Badge>}
            />
          </Panel>
          <Panel title="Deals">
            <DealCard
              deal={{
                id: "d6",
                title: "Nordhafen renewal",
                value: 36000,
                probability: 80,
                closeDate: new Date(2026, 10, 30),
                daysInStage: 4,
                owner: "Mara Ellis",
                next: "Contract to legal",
              }}
              onOpen={() => {}}
            />
            <DealCard
              deal={{
                id: "d3",
                title: "Shop migration",
                value: 42000,
                probability: 30,
                closeDate: new Date(2026, 11, 12),
                daysInStage: 6,
                owner: "Mara Ellis",
              }}
              onOpen={() => {}}
            />
          </Panel>
        </div>
        <Panel title="Buying committee">
          <OrgChart
            root={{
              name: "Henrik Sørensen",
              role: "Managing Director",
              avatar: true,
              children: [
                { name: "Lena Hartmann", role: "Operations", avatar: true },
                { name: "Pia Krüger", role: "Purchasing", avatar: true },
                { name: "Tom Becker", role: "IT", avatar: true },
              ],
            }}
          />
        </Panel>
        <Panel title="Activity" subtitle="Across all contacts">
          <RecordTimeline entries={ENTRIES.slice(1)} now={NOW} filters={false} />
        </Panel>
      </Stagger>
    </AppShell>
  );
}
```

## Props

### AppShell

| Prop | Type | Notes |
| --- | --- | --- |
| `active?` | `string` |  |
| `brand?` | `ReactNode` | The product name, or a node (a logo mark with the name; collapsed sidebars show it whole). |
| `brandDot?` | `boolean` | The status dot after the brand (default `true`); turn it off next to a logo of your own. |
| `tag?` | `string` |  |
| `nav?` | `NavItem[]` |  |
| `user?` | `{ name: string; email?: string }` |  |
| `onNavigate?` | `(label: string) => void` |  |
| `topExtra?` | `ReactNode` |  |
| `sheetStyle?` | `CSSProperties` |  |
| `contentKey?` | `string \| number` |  |
| `side?` | `ReactNode` |  |
| `dock?` | `boolean` |  |
| `dockItems?` | `DockProps["items"]` |  |
| `railTop?` | `RailItem[]` |  |
| `railBottom?` | `RailItem[]` |  |
| `fill?` | `boolean` | The shell is the whole page: at least the viewport's height (100dvh), no outer radius, the sheet fills the rest; on desktop the sidebar stays in view while the page scrolls, on phones the sheet starts right under the sidebar's bar. |
| `navigation?` | `"top" \| "sidebar"` |  |
| `sidebarGroups?` | `SidebarGroup[]` | With `navigation="sidebar"`: groups instead of the flat `nav` list. |
| `sidebar?` | `Partial<Omit<SidebarProps, "variant" \| "groups">>` | With `navigation="sidebar"`: more sidebar props (collapsed, storageKey, shortcut, linkAs …). |
| `workspaces?` | `WorkspaceSwitcherProps` | With `navigation="sidebar"`: the workspace switcher at the top instead of the brand. |
| `userMenu?` | `(MenuItem \| "-")[]` | The account menu's entries (with `navigation="sidebar"` at the foot of the sidebar). |
| `topbar?` | `boolean \| ReactNode` | With `navigation="sidebar"`: a bar across the top of the frame. The brand (or `workspaces`) moves into its start, as wide as the sidebar below it (expanded or collapsed); `topStart` follows it, `topEnd` sits at the end. Frame, bar and sidebar read as one L around the sheet. Content given here goes between `topStart` and `topEnd`. On phones the bar is the sidebar's bar (menu button and brand) with `topEnd` on the right and `topStart` behind an icon button. |
| `topStart?` | `ReactNode` | With `topbar`: right after the brand, e.g. a search field or a command palette trigger. |
| `topEnd?` | `ReactNode` | With `topbar`: at the end of the bar (buttons, menus); `topExtra` goes there too. |
| `topStartCompact?` | `ReactNode` | With `topbar` on phones: what stands in for `topStart` (default: an icon button that opens `topStart` over the bar). |
| `topStartIcon?` | `IconName` | The icon of that button (default `search`). |
| `topStartLabel?` | `string` | The accessible name of that button (default "Search"). |
| `children?` | `ReactNode` |  |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### Badge

| Prop | Type | Notes |
| --- | --- | --- |
| `tone?` | `Tone` |  |
| `dot?` | `boolean` |  |
| `live?` | `boolean` |  |
| `children?` | `ReactNode` |  |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### DealCard

| Prop | Type | Notes |
| --- | --- | --- |
| `deal` | `Deal` | Required |
| `staleAfter?` | `number` | Days in stage after which the deal is marked as stale (default 14). |
| `onOpen?` | `(id: string) => void` |  |
| `stages?` | `{ id: string; label: string }[]` | Stages offered in the card's "Move to" menu. |
| `onMove?` | `(id: string, stageId: string) => void` |  |
| `surface?` | `Surface` |  |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### 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. |

### ListRow

| Prop | Type | Notes |
| --- | --- | --- |
| `avatar?` | `string` |  |
| `icon?` | `IconName` |  |
| `tint?` | `Tint \| "plain"` |  |
| `leading?` | `ReactNode` |  |
| `title` | `ReactNode` | Required |
| `subtitle?` | `ReactNode` |  |
| `meta?` | `ReactNode` |  |
| `trailing?` | `ReactNode` |  |
| `unread?` | `boolean` |  |
| `active?` | `boolean` |  |
| `onClick?` | `() => void` |  |
| `href?` | `string` | Makes the row a link (with `linkAs` for a router's link). |
| `linkAs?` | `ElementType` |  |
| `actions?` | `ReactNode` | Buttons of the row's own (rename, remove …), outside the clickable area so nothing interactive is nested. Without `onClick` and `href` the row is not interactive at all. |
| `titleLines?` | `number` | Lines the title may take before it ends in an ellipsis (default: it wraps freely). |
| `subtitleLines?` | `number` | Lines the subtitle may take (default 1); badges and facts wrap within them. |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### OrgChart

| Prop | Type | Notes |
| --- | --- | --- |
| `root` | `OrgNode` | Required |
| `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. |

### RecordHeader

| Prop | Type | Notes |
| --- | --- | --- |
| `kind?` | `"person" \| "company" \| "deal" \| "matter"` | Sets the default picture: a person's initials, a company's monogram, a deal or matter icon. |
| `title` | `string` | Required |
| `subtitle?` | `ReactNode` | "Head of Operations at Nordhafen", "Matter 2026/0412". |
| `avatar?` | `ReactNode` | Your own picture (a photo, a logo); default from `kind`. |
| `icon?` | `IconName` |  |
| `status?` | `{ label: string; tone?: Tone }` | The stage or status as a badge. |
| `tags?` | `string[]` |  |
| `owner?` | `string` | Who looks after the record. |
| `facts?` | `{ label: string; value: ReactNode }[]` | Key facts in a row: value, phone, close date … |
| `actions?` | `{ label: string; icon?: IconName; onClick?: () => void; primary?: boolean }[]` | Quick actions: Call, Email, Meeting, Note … The first `primary` one is the main button. |
| `menu?` | `ReactNode` | More actions on the right (a menu button). |
| `surface?` | `Surface` |  |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### RecordTimeline

| Prop | Type | Notes |
| --- | --- | --- |
| `entries` | `RecordEntry[]` | Required |
| `now?` | `Date \| string \| number` | "Now" for the day headings; pass it so server and client render the same. |
| `filters?` | `boolean` | Chips that filter by type (default true). |
| `onAdd?` | `(type: "note" \| "call" \| "task", text: string) => void` | Adds the composer for a note, a logged call or a task. |
| `label?` | `string` | Accessible name (default "Activity"). |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |
