Workspace Table

The workspace's Interactions and Documents tables: 36 px headings, sortable ones with ↑↓ at 40 % and the sorted one dark with a single arrow; 40 px rows of 12 px text. Rows show keyboard focus with the hover highlight, never a ring, and their menu on hover or focus.

BetaReady to use. Its API can still change in a minor release; the changelog says when.

LEAP CRMBuilt for the CRM from the core library. It knows about the CRM's own records, so it isn't a general building block.

import { WorkspaceTable, WorkspaceInteractionRow, WorkspaceDocumentRow } from "@leap-crm/design-system";

Interactions

Type badge, the title (a button that opens it; long ones truncate), sparkles when Firm Pilot summarised it, two faces at most, the date, time entry and billed (an empty value when there is none), the first tag and +N. An upcoming interaction fades its glyphs to 55 % and mutes its title, keeping AA contrast. Press Date or Billed to sort.

TypeTitleSummaryParticipantsTime entryTagsActions
Summarised by Firm PilotYesterdayNo time entryNot billedLead
2 days ago0:30$120.00Settlement+2
UpcomingNext TuesdayNo time entryNot billed

Documents

Every column sorts. The doctype art at 20 px (the CRM passes @leapdev/gui-icons; never recolour it), the name, an optional folder path, then date, uploader, type and size.

Actions
18 Nov 2026
Sam Evans
PDF1.2 MB
… / Settlement / Statements17 Nov 2026
Mia Grant
Excel84 KB

What the examples share

The imports and the scaffolding the examples above call. The scaffolding lives in this page, not in the library.

import { EllipsisVertical, FileText, Sheet } from "lucide-react";

import { useState } from "react";

import { IconButton, WorkspaceDocumentRow, WorkspaceInteractionRow, WorkspaceTable, type SortDirection, type WorkspaceTableColumn } from "@leap-crm/design-system";

const interactionColumns: WorkspaceTableColumn[] = [
  { id: "type", label: "Type", className: "w-16" },
  { id: "title", label: "Title" },
  { id: "summary", label: "Summary", className: "w-9", hideLabel: true },
  { id: "participants", label: "Participants", className: "w-28" },
  {
    id: "date",
    label: "Date",
    className: "w-34",
    align: "end",
    sortable: true,
  },
  { id: "time", label: "Time entry", className: "w-26" },
  { id: "billed", label: "Billed", className: "w-32", sortable: true },
  { id: "tags", label: "Tags", className: "w-28" },
  { id: "menu", label: "Actions", className: "w-11", hideLabel: true },
];

const documentColumns: WorkspaceTableColumn[] = [
  { id: "title", label: "Title", sortable: true },
  { id: "date", label: "Date", className: "w-34", sortable: true },
  { id: "uploadedBy", label: "Uploaded by", className: "w-32", sortable: true },
  { id: "type", label: "Type", className: "w-20", sortable: true },
  {
    id: "size",
    label: "Size",
    className: "w-22",
    align: "end",
    sortable: true,
  },
  { id: "menu", label: "Actions", className: "w-11", hideLabel: true },
];

const more = (label: string) => (
  <IconButton size="xs" icon={<EllipsisVertical />} aria-label={label} />
);

const noop = () => undefined;

function useSort(initial: string) {
  const [sort, setSort] = useState<{ id: string; direction: SortDirection }>({
    id: initial,
    direction: "descending",
  });
  const onSortChange = (id: string) =>
    setSort(current => ({
      id,
      direction:
        current.id === id && current.direction === "descending"
          ? "ascending"
          : "descending",
    }));
  return { sort, onSortChange };
}

function Interactions() {
  const { sort, onSortChange } = useSort("date");
  return (
    <WorkspaceTable
      label="Interactions"
      columns={interactionColumns}
      sort={sort}
      onSortChange={onSortChange}
    >
      <WorkspaceInteractionRow
        type="email"
        direction="inbound"
        title="Re: Vendor contract"
        summarised
        participants={[
          { id: "1", name: "Tom Chen", initials: "TC" },
          { id: "2", name: "Sam Evans", initials: "SE" },
        ]}
        date="Yesterday"
        tags={["Lead"]}
        onOpen={noop}
        actions={more("More actions for Re: Vendor contract")}
      />
      <WorkspaceInteractionRow
        type="phone"
        direction="outbound"
        title="Called the vendor's solicitor about the deposit release authority and the cooling-off period"
        participants={[{ id: "2", name: "Sam Evans", initials: "SE" }]}
        date="2 days ago"
        timeEntry="0:30"
        billed="$120.00"
        tags={["Settlement", "Urgent", "Bank"]}
        onOpen={noop}
        actions={more("More actions for the call")}
      />
      <WorkspaceInteractionRow
        type="meeting"
        title="Settlement meeting"
        participants={[
          { id: "1", name: "Tom Chen", initials: "TC" },
          { id: "2", name: "Sam Evans", initials: "SE" },
          { id: "3", name: "Mia Grant", initials: "MG" },
        ]}
        date="Next Tuesday"
        upcoming
        onOpen={noop}
        actions={more("More actions for Settlement meeting")}
      />
    </WorkspaceTable>
  );
}

function Documents() {
  const { sort, onSortChange } = useSort("date");
  return (
    <WorkspaceTable
      label="Documents"
      columns={documentColumns}
      sort={sort}
      onSortChange={onSortChange}
    >
      <WorkspaceDocumentRow
        icon={<FileText className="text-signal-destructive" />}
        name="Contract of sale.pdf"
        date="18 Nov 2026"
        uploadedBy="Sam Evans"
        type="PDF"
        size="1.2 MB"
        onOpen={noop}
        actions={more("More actions for Contract of sale.pdf")}
      />
      <WorkspaceDocumentRow
        icon={<Sheet className="text-status-success-text" />}
        name="Settlement statement.xlsx"
        folder="… / Settlement / Statements"
        date="17 Nov 2026"
        uploadedBy="Mia Grant"
        type="Excel"
        size="84 KB"
        onOpen={noop}
        actions={more("More actions for Settlement statement.xlsx")}
      />
    </WorkspaceTable>
  );
}

Best practices

When to use it, and the rules that apply in particular places.

GuidancePractice
DoGive the table a label, like “Interactions” or “Documents”, and set hideLabel on a column with no visible heading, like the menu, so screen readers still hear its name.
DoPair each row with the columns its docs list, like Type w-16 and Date w-34 for WorkspaceInteractionRow, so headings and cells line up.
DoSet upcoming on an interaction that hasn't happened yet. Its glyphs fade and its title goes muted, so the text keeps AA contrast; never fade the row yourself.
DoLeave timeEntry or billed out when there is none. The cell shows a named empty value, like “Not billed”, instead of a blank.
Don'tRecolour a document row's icon. It is brand file art for PDF, Word, Excel or image files.
Don'tUse it for a full-page list, like the opportunities list. Use Table; WorkspaceTable is for the workspace's Interactions and Documents.

Props

WorkspaceTable

PropTypeDefaultDescription
label *string—Names the table for screen readers, like "Interactions".
columns *unknown—The columns: id, label, and an optional width class and sort.
sort{ id: string; direction: SortDirection }—The column it's sorted by now, and which way.
onSortChange(id: string) => void—Called with a sortable column's id when its heading is pressed.
children *ReactNode—The rows: WorkspaceInteractionRow or WorkspaceDocumentRow.
classNamestring—Classes added to the root element, merged with its own. Tokens only.

WorkspaceInteractionRow

PropTypeDefaultDescription
type *InteractionTypeBadgeProps["type"]—email, phone or meeting, as InteractionTypeBadge.
directionInteractionTypeBadgeProps["direction"]—inbound or outbound, for the badge's arrow.
title *string—The subject, or what the call or meeting was about.
summarisedbooleanfalseFirm Pilot has summarised it: shows the sparkles.
participantsAvatarItem[][]Who took part, two faces at most.
date *string—When, already worded, like "Yesterday".
timeEntrystring—The time entry, like "0:30", or nothing for an empty value.
billedstring—What was billed, like "$120.00", or nothing for an empty value.
tagsunknown[]Interaction tags, after the title.
upcomingbooleanfalseHasn't happened yet: its glyphs fade to 55 % and its title goes muted, so the text still passes AA.
onOpen() => void—Opens the interaction. Makes the title a button.
actionsReactNode—The row's menu, shown on hover or focus.

WorkspaceDocumentRow

PropTypeDefaultDescription
icon *ReactNode—The 20 px doctype art (PDF, Word, Excel, image). Brand file art: never recolour it.
name *string—The document's file name.
folderstring—The folder it sits in, like "… / Contracts".
date *string—When, already worded, like "18 Nov 2026".
uploadedBy *string—Who added the document.
type *string—The type's label, like "PDF".
size *string—Already worded, like "1.2 MB".
onOpen() => void—Opens the document. Makes the name a button.
actionsReactNode—The row's menu, shown on hover or focus.

Keyboard

The keys it answers to. Tab moves between components, arrows move within them.

KeysWhat they do
TabMoves through the sortable headers and each row's record.
EnterSpaceSort by the focused column header, or open the focused row's record.