# Outreach

> Working a sequence: the steps with their open and reply rates, the call of today's step with notes, and booking the demo in a free slot.

Pattern · Pro kit · [Live page](https://ui.twentyfirst.media/pro/patterns/OutreachScreen/)

Working a sequence: the steps with their open and reply rates, the call of today's step with notes,
and booking the demo in a free slot.

## Code

```tsx
import * as React from "react";
import {
  AppShell,
  BookingSlots,
  Button,
  CallPanel,
  PageHeader,
  Panel,
  SequenceSteps,
  Stagger,
} from "@twentyfirstmedia/pro";
import { CRM_NAV, NOW } from "./_crm";
import { DAYS, STEPS } from "./_sales";

/** Working a sequence: the steps with their results, today's call, and booking the next meeting. */
export default function Preview() {
  const [step, setStep] = React.useState("3");
  const [muted, setMuted] = React.useState(false);
  const [hold, setHold] = React.useState(false);
  const [notes, setNotes] = React.useState("");
  const [slot, setSlot] = React.useState<{ date: Date | string | number; time: string } | null>(
    null,
  );
  return (
    <AppShell
      navigation="sidebar"
      brand="Pilot CRM"
      sidebarGroups={CRM_NAV}
      active="sequences"
      user={{ name: "Mara Ellis", email: "mara@pilot.app" }}
      dock={false}
    >
      <div className="tf-in">
        <PageHeader
          title="Outdoor retail Q4"
          subtitle="Sequence · 240 enrolled · 19 replied"
          actions={[
            <Button key="pause" variant="secondary" icon="pause">
              Pause
            </Button>,
            <Button key="add" icon="plus">
              Enroll people
            </Button>,
          ]}
        />
      </div>
      <Stagger
        className="tf-grid"
        style={
          {
            "--cols": "minmax(0, 1fr) minmax(0, 1fr)",
            "--cols-sm": "1fr",
            gap: 16,
            alignItems: "start",
          } as React.CSSProperties
        }
      >
        <Panel title="Steps">
          <SequenceSteps steps={STEPS} selected={step} onSelect={setStep} />
        </Panel>
        <div className="tf-col" style={{ gap: 16 }}>
          <Panel title="Call · step 3">
            <CallPanel
              name="Lena Hartmann"
              subtitle="Head of Operations · Nordhafen Outdoor"
              number="+49 40 2287 1190"
              state={hold ? "hold" : "active"}
              startedAt={new Date(NOW.getTime() - 196000)}
              now={NOW}
              muted={muted}
              onMute={setMuted}
              onHold={setHold}
              onEnd={() => {}}
              notes={notes}
              onNotes={setNotes}
            />
          </Panel>
          <Panel title="Book the demo">
            <BookingSlots
              days={DAYS}
              duration={45}
              timeZone="Europe/Berlin"
              value={slot}
              onChange={setSlot}
              onConfirm={() => {}}
            />
          </Panel>
        </div>
      </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. |

### BookingSlots

| Prop | Type | Notes |
| --- | --- | --- |
| `days` | `BookingDay[]` | Required |
| `value?` | `{ date: Date \| string \| number; time: string } \| null` |  |
| `onChange?` | `(value: { date: Date \| string \| number; time: string }) => void` |  |
| `onConfirm?` | `(value: { date: Date \| string \| number; time: string }) => void` | Shows "Confirm" once a time is picked. |
| `duration?` | `number` | Minutes. |
| `timeZone?` | `string` | Shown under the times, "Europe/Berlin". |
| `title?` | `string` |  |
| `host?` | `string` |  |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### Button

| Prop | Type | Notes |
| --- | --- | --- |
| `variant?` | `"primary" \| "secondary" \| "soft" \| "ghost" \| "danger" \| "danger-solid"` |  |
| `size?` | `"md" \| "sm"` |  |
| `icon?` | `IconName` |  |
| `iconRight?` | `IconName` |  |
| `disabled?` | `boolean` |  |
| `type?` | `"button" \| "submit" \| "reset"` |  |
| `onClick?` | `(e: MouseEvent<HTMLButtonElement>) => void` |  |
| `children?` | `ReactNode` |  |
| `asChild?` | `boolean` | Render the single child element (a link, a router Link) with the button's look instead of a <button>. |
| `id?` | `string` |  |
| `name?` | `string` | Form field name and value, sent with the form when this button submits it. |
| `value?` | `string` |  |
| `form?` | `string` | The id of the form this button belongs to, when it sits outside it. |
| `title?` | `string` |  |
| `tabIndex?` | `number` |  |
| `autoFocus?` | `boolean` |  |
| `aria-label?` | `string` |  |
| `aria-labelledby?` | `string` |  |
| `aria-describedby?` | `string` |  |
| `aria-expanded?` | `boolean \| "true" \| "false"` | For disclosure and menu triggers: whether what the button controls is open. |
| `aria-controls?` | `string` |  |
| `aria-haspopup?` | `boolean \| "true" \| "false" \| "menu" \| "listbox" \| "tree" \| "grid" \| "dialog"` |  |
| `aria-pressed?` | `boolean \| "true" \| "false" \| "mixed"` | For toggle buttons. |
| `aria-current?` | `boolean \| "true" \| "false" \| "page" \| "step" \| "location" \| "date" \| "time"` |  |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### CallPanel

| Prop | Type | Notes |
| --- | --- | --- |
| `name` | `string` | Required |
| `subtitle?` | `ReactNode` | "Head of Operations · Nordhafen". |
| `number?` | `string` |  |
| `state` | `"ringing" \| "active" \| "hold" \| "ended"` | Required |
| `startedAt?` | `Date \| string \| number` | When the call was answered; the timer counts from here. |
| `now?` | `Date \| string \| number` | Fixed "now" for the timer (server rendering, screenshots); ticks every second when unset. |
| `muted?` | `boolean` |  |
| `recording?` | `boolean` |  |
| `onAnswer?` | `() => void` |  |
| `onMute?` | `(muted: boolean) => void` |  |
| `onHold?` | `(hold: boolean) => void` |  |
| `onRecord?` | `(recording: boolean) => void` |  |
| `onEnd?` | `() => void` |  |
| `notes?` | `string` | Shows a notes field. |
| `onNotes?` | `(text: string) => void` |  |
| `outcomes?` | `string[]` | Shows an outcome picker ("Connected", "Voicemail" …). |
| `outcome?` | `string` |  |
| `onOutcome?` | `(outcome: string) => void` |  |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### PageHeader

| Prop | Type | Notes |
| --- | --- | --- |
| `crumbs?` | `(string \| Crumb)[]` | A breadcrumb above the title (see `Breadcrumb`): labels, or items with `href`/`onClick`. |
| `crumbLinkAs?` | `ElementType` | The element crumb links render as, e.g. Next.js `Link`. |
| `title` | `string` | Required |
| `subtitle?` | `string` |  |
| `actions?` | `ReactNode[]` |  |
| `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. |

### SequenceSteps

| Prop | Type | Notes |
| --- | --- | --- |
| `steps` | `SequenceStep[]` | Required |
| `onSelect?` | `(id: string) => void` | Makes each step a button. |
| `selected?` | `string` |  |
| `label?` | `string` | Accessible name (default "Sequence"). |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |
