# Law Matter

> A matter in a law firm: court deadlines, the conflict check with its decision, time recorded on the matter, and the file with a pinned note.

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

A matter in a law firm: court deadlines, the conflict check with its decision, time recorded on
the matter, and the file with a pinned note.

## Code

```tsx
import * as React from "react";
import {
  AppShell,
  ConflictCheck,
  DeadlineList,
  Panel,
  RecordHeader,
  RecordTimeline,
  Stagger,
  TimeTracker,
} from "@twentyfirstmedia/pro";
import type { RecordEntry } from "@twentyfirstmedia/pro";
import { NOW } from "./_crm";
import { HITS, LAW_NAV } from "./_industry";

const ENTRIES: RecordEntry[] = [
  {
    id: "1",
    type: "document",
    title: "Statement of claim received",
    at: new Date(2026, 10, 10, 11, 0),
    actor: "Court",
    meta: "ArbG Hamburg 27 Ca 412/26",
  },
  {
    id: "2",
    type: "meeting",
    title: "Client meeting: facts and documents",
    at: new Date(2026, 10, 12, 15, 0),
    actor: "Dr. Anna Weber",
    meta: "1 h 30 min",
  },
  {
    id: "3",
    type: "note",
    title: "Witness: shift lead Jan Ohm confirms the warning was never handed over",
    at: new Date(2026, 10, 13, 9, 40),
    actor: "Dr. Anna Weber",
    pinned: true,
  },
];

/** A matter in a law firm: the conflict check, court deadlines, time on the matter and the file. */
export default function Preview() {
  const [decision, setDecision] = React.useState<"cleared" | "declined" | undefined>("cleared");
  const [running, setRunning] = React.useState(false);
  return (
    <AppShell
      navigation="sidebar"
      brand="Weber Arbeitsrecht"
      sidebarGroups={LAW_NAV}
      active="matters"
      user={{ name: "Dr. Anna Weber", email: "weber@weber-arbeitsrecht.de" }}
      dock={false}
    >
      <Stagger className="tf-col" style={{ gap: 16 }}>
        <RecordHeader
          kind="matter"
          title="Hartmann ./. Elbe Logistik GmbH"
          subtitle="Matter 2026/0412 · Unfair dismissal · ArbG Hamburg"
          status={{ label: "Open", tone: "info" }}
          tags={["Labour law"]}
          owner="Dr. Anna Weber"
          actions={[
            { label: "Log time", icon: "clock", primary: true },
            { label: "New document", icon: "file" },
          ]}
          facts={[
            { label: "Next deadline", value: "Nov 24 · Statement" },
            { label: "Value in dispute", value: "€38,500" },
            { label: "Hours recorded", value: "21.5 h" },
          ]}
        />
        <div
          className="tf-grid"
          style={
            {
              "--cols": "minmax(0, 1fr) minmax(0, 1fr)",
              "--cols-sm": "1fr",
              gap: 16,
              alignItems: "start",
            } as React.CSSProperties
          }
        >
          <Panel title="Deadlines">
            <DeadlineList
              today={NOW}
              items={[
                {
                  id: "1",
                  title: "Statement on the claim",
                  kind: "Court deadline",
                  icon: "flag",
                  date: new Date(2026, 10, 24),
                },
                {
                  id: "2",
                  title: "Conciliation hearing",
                  kind: "Hearing",
                  icon: "calendar",
                  date: new Date(2026, 11, 3),
                },
                {
                  id: "3",
                  title: "Advance on costs",
                  kind: "Invoice",
                  icon: "card",
                  date: new Date(2026, 10, 30),
                  amount: 1800,
                },
                {
                  id: "4",
                  title: "Power of attorney filed",
                  kind: "Court",
                  icon: "file",
                  date: new Date(2026, 10, 11),
                  done: true,
                },
              ]}
            />
          </Panel>
          <Panel title="Conflict check">
            <ConflictCheck
              parties={["Lena Hartmann", "Elbe Logistik GmbH", "Kai Petersen"]}
              hits={HITS}
              checkedAt={new Date(2026, 10, 10, 11, 20)}
              decision={decision}
              onDecide={setDecision}
            />
          </Panel>
          <Panel title="Time on this matter">
            <TimeTracker
              running={running}
              startedAt={NOW}
              now={NOW}
              task="Draft statement on the claim"
              onStart={() => setRunning(true)}
              onStop={() => setRunning(false)}
              entries={[
                {
                  id: "1",
                  project: "2026/0412",
                  task: "Read the claim, first assessment",
                  minutes: 75,
                  billable: true,
                },
                {
                  id: "2",
                  project: "2026/0412",
                  task: "Client meeting",
                  minutes: 90,
                  billable: true,
                },
              ]}
            />
          </Panel>
          <Panel title="File">
            <RecordTimeline entries={ENTRIES} now={NOW} filters={false} />
          </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. |

### ConflictCheck

| Prop | Type | Notes |
| --- | --- | --- |
| `parties` | `string[]` | The names to check: client, opposing party, related people and companies. |
| `onParties?` | `(parties: string[]) => void` | Makes the parties editable. |
| `hits` | `ConflictHit[]` | Required |
| `checkedAt?` | `Date \| string \| number` | When the check last ran; no result is shown before. |
| `onCheck?` | `() => void` | Shows "Run check". |
| `onDecide?` | `(decision: "cleared" \| "declined") => void` | Shows "Clear to proceed" and "Decline matter". |
| `decision?` | `"cleared" \| "declined"` |  |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### DeadlineList

| Prop | Type | Notes |
| --- | --- | --- |
| `items` | `DeadlineItem[]` | Required |
| `today?` | `Date \| string \| number` | The day to count from (default: now). Set it for server rendering and stable output. |
| `soon?` | `number` | Days ahead that count as soon (default 14). |
| `currency?` | `string` |  |
| `onDone?` | `(id: string) => void` |  |
| `label?` | `string` | Accessible name (default "Deadlines"). |
| `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. |

### TimeTracker

| Prop | Type | Notes |
| --- | --- | --- |
| `running?` | `boolean` |  |
| `startedAt?` | `Date \| string \| number` |  |
| `now?` | `Date \| string \| number` | Fixed "now" for the timer; ticks every second when unset. |
| `task?` | `string` |  |
| `onTask?` | `(task: string) => void` |  |
| `project?` | `string` |  |
| `projects?` | `string[]` |  |
| `onProject?` | `(project: string) => void` |  |
| `billable?` | `boolean` |  |
| `onBillable?` | `(billable: boolean) => void` |  |
| `onStart?` | `() => void` |  |
| `onStop?` | `() => void` |  |
| `entries?` | `TimeEntry[]` | Today's entries under the timer, with their total. |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |
