Account pipeline
NewThe Companies screen of a sales CRM: tags, owners, win probability as segments and twelve weeks of activity, with swings, bursts and cooling flagged.
account-pipeline/account-pipeline.tsxCompanies
Active| Segment & Stage | Account Owner | Activity Trend | Actions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Priya Nair | 4 | $610,400 | No score | Activity: 2 touches last week, rising | Oct 18Discovery | ||||
| Kenji Mori and Felix Brandt | 6 | $530,111 | 82% win probability, likely, up 18 points in two weeks | Activity: 7 touches last week, rising | Oct 24Exec sync | ||||
| Lucía Ortega, Lucía Ortega is away until Nov 3 | 6 | $520,000 | 24% win probability, at risk | Activity: 3 touches last week, steady | Oct 9Pricing | ||||
| 3 | $442,231 | 44% win probability, in play | Activity: 4 touches last week, steady | Oct 23Demo | |||||
| Felix Brandt | 2 | $420,222 | 38% win probability, in play | Activity: no touches in 4 weeks | Sep 28Pricing | ||||
| Ana Ribeiro | 7 | $420,000 | 70% win probability, likely | Activity: 7 touches last week, rising | Oct 27QBR call | ||||
| Diego Paz | 4 | $333,221 | 23% win probability, at risk | Activity: 1 touches last week, steady | Oct 11Discovery | ||||
| Theo Marsh | 8 | $320,222 | 86% win probability, likely | Activity: 6 touches last week, steady | Oct 28Pilot check-in | ||||
| Theo Marsh | 4 | $311,242 | 51% win probability, in play | Activity: 5 touches last week, rising | Oct 26Demo | ||||
| Kenji Mori | 8 | $289,921 | 38% win probability, in play | Activity: 3 touches last week, steady, a burst of 11 in week 9 | Oct 16Partner | ||||
| Lucía Ortega, Lucía Ortega is away until Nov 3 | 5 | $230,112 | 61% win probability, likely | Activity: 4 touches last week, steady | Oct 19Product | ||||
| Amara Okafor | 2 | $221,231 | 77% win probability, likely | Activity: 5 touches last week, steady | Oct 21Legal | ||||
| Marcus Hale | 3 | $221,221 | 72% win probability, likely | Activity: 6 touches last week, steady | Oct 25Pilot check-in | ||||
| Jonah Weiss | 2 | $210,123 | 52% win probability, in play | Activity: 5 touches last week, rising | Oct 27QBR call | ||||
| Ana Ribeiro and Priya Nair | 5 | $170,991 | 31% win probability, at risk, down 27 points in two weeks | Activity: 1 touches last week, cooling | Oct 12Expansion | ||||
| Yara Haddad | 9 | $139,007 | 45% win probability, in play | Activity: 3 touches last week, steady | Oct 20Renewal | ||||
| Priya Nair | 5 | $124,232 | 22% win probability, at risk, down 25 points in two weeks | Activity: 0 touches last week, cooling | Oct 8Security review | ||||
| Jonah Weiss | 3 | $122,230 | 51% win probability, in play | Activity: 3 touches last week, steady, a burst of 9 in week 8 | Oct 22Pricing | ||||
| Sofia Lund | 8 | $112,277 | 24% win probability, at risk | Activity: 1 touches last week, steady | Oct 14Renewal | ||||
| Felix Brandt | 1 | $64,800 | 63% win probability, likely | Activity: 4 touches last week, rising | Oct 26Demo |
The live component, numbered part by part. Every measurement is read from it as it is drawn. Point at a row to outline its part, or at a part to find its row.
The choices it offers, each value drawn live and the default marked, with how to pick one.
When to use
- A sales team’s book of accounts, where each company needs its odds, its money and how warm it is read side by side, and the risky ones have to stand out without a report.
- A list worth cutting several ways: by team, region or a saved view like the slipping deals, then by owner, tag and last touch, with the totals following the cut.
- Rows that carry small readings rather than long text: a probability, a run of weekly counts, a few tags and a face. The cells draw what stands out on their own.
- A CRM screen with its own navigation, where the sidebar, the tabs and the footer come with the table and fold into a drawer on a phone.
When not to use
- A board of deals moving between stages. Use a kanban with columns per stage; the table shows companies, not the steps of each deal.
- One account in depth. Open its own page with contacts, deals and a timeline; a row has room for a reading, not a history.
- A forecast for the board. Use a chart of the quarter against its target; the Forecast tab only weights each row by its odds.
- Thousands of companies. The table draws every row; past a few hundred, page it on the server and keep the footer’s sums there too.
- Live alerts. A slipping deal only changes colour; send a drop in the odds as a notification to its owner.
What the cells flag
Each cell reads its own data and draws what stands out, so nobody has to set a flag by hand:
- A swing in the odds: 15 points or more since
before, drawn as outlines or lit segments and a chip. - A burst of activity: a week of six or more touches, three deviations over the others and two and a half times their mean, in amber with a dot.
- A cooling end: the last three weeks at half the earlier ones or less, in red. Quiet: two or more empty weeks at the end, as flat dashes.
- Churn risk carries a warning sign in its tag, and an owner who is away gets a dot and an Away chip with the day they are back.
Slipping deals
The Slipping Deals view gathers every account that has one of those flags against it: odds down 15 points or more in two weeks, activity cooling or quiet, or tagged Churn risk. Its count sits in the sidebar, so the size of the problem shows before the view is opened.
Each one drawn with the component itself, used well or badly.
The table is scanned more than read: short labels, the same words in every row.
- Tags of one or two words, in sentence case:
New logo,Land & expand,Churn risk. Each tag keeps one tone wherever it shows, and red is kept for risk: onlyChurn riskwears it. - Column headers in title case, naming what is measured:
Win Probability,Activity Trend,Last Interaction. - Name views by who or what is in them:
Strategic AEs,EMEA Enterprise,Slipping Deals. - Money in whole dollars with thousands separators, the tab saying which sum it is: the open pipeline, the average deal or the forecast.
- Company names as they are known, not legal names: the name is the row’s header and what a screen reader hears first.
You can add this component with the shadcn CLI or by hand:
Into components/account-pipeline of any React project, with no setup:
npx shadcn@latest add https://brunodelorence.com/r/account-pipeline.json- Copy the component files
Copy these files into one folder of your project, keeping their relative imports together, or download them as a ZIP:
- Copy the media files
To the same paths under your project’s public folder:
/experiments/visual-revision/v2/people/ana-96.webp/experiments/visual-revision/v2/people/ana-192.webp/experiments/visual-revision/v2/people/ana-384.webp/experiments/visual-revision/v2/people/ana-768.webp/experiments/visual-revision/v2/people/priya-96.webp/experiments/visual-revision/v2/people/priya-192.webp/experiments/visual-revision/v2/people/priya-384.webp/experiments/visual-revision/v2/people/priya-768.webp/experiments/visual-revision/v2/people/jonah-96.webp/experiments/visual-revision/v2/people/jonah-192.webp/experiments/visual-revision/v2/people/jonah-384.webp/experiments/visual-revision/v2/people/jonah-768.webp/experiments/visual-revision/v2/people/lucia-96.webp/experiments/visual-revision/v2/people/lucia-192.webp/experiments/visual-revision/v2/people/lucia-384.webp/experiments/visual-revision/v2/people/lucia-768.webp/experiments/visual-revision/v2/people/kenji-96.webp/experiments/visual-revision/v2/people/kenji-192.webp/experiments/visual-revision/v2/people/kenji-384.webp/experiments/visual-revision/v2/people/kenji-768.webp/experiments/visual-revision/v2/people/felix-96.webp/experiments/visual-revision/v2/people/felix-192.webp/experiments/visual-revision/v2/people/felix-384.webp/experiments/visual-revision/v2/people/felix-768.webp/experiments/visual-revision/v2/people/amara-96.webp/experiments/visual-revision/v2/people/amara-192.webp/experiments/visual-revision/v2/people/amara-384.webp/experiments/visual-revision/v2/people/amara-768.webp/experiments/visual-revision/v2/people/sofia-96.webp/experiments/visual-revision/v2/people/sofia-192.webp/experiments/visual-revision/v2/people/sofia-384.webp/experiments/visual-revision/v2/people/sofia-768.webp/experiments/visual-revision/v2/people/yara-96.webp/experiments/visual-revision/v2/people/yara-192.webp/experiments/visual-revision/v2/people/yara-384.webp/experiments/visual-revision/v2/people/yara-768.webp/experiments/visual-revision/v2/people/marcus-96.webp/experiments/visual-revision/v2/people/marcus-192.webp/experiments/visual-revision/v2/people/marcus-384.webp/experiments/visual-revision/v2/people/marcus-768.webp/experiments/visual-revision/v2/people/diego-96.webp/experiments/visual-revision/v2/people/diego-192.webp/experiments/visual-revision/v2/people/diego-384.webp/experiments/visual-revision/v2/people/diego-768.webp/experiments/visual-revision/v2/people/theo-96.webp/experiments/visual-revision/v2/people/theo-192.webp/experiments/visual-revision/v2/people/theo-384.webp/experiments/visual-revision/v2/people/theo-768.webp/experiments/visual-revision/v2/people/bruno-96.webp/experiments/visual-revision/v2/people/bruno-192.webp/experiments/visual-revision/v2/people/bruno-384.webp/experiments/visual-revision/v2/people/bruno-768.webp/experiments/visual-revision/manifests/account-pipeline.json
- Import it
As shown under Usage, below.
Either way it needs React 19 and a bundler that supports CSS Modules, such as Next.js or Vite. It has a dark colour scheme: it follows your page’s color-scheme, light unless the page sets one, or its colorScheme prop, with nothing to configure. Browsers without light-dark() show it light.
Usage
import { AccountPipeline } from './account-pipeline';import { ActivityBars, OwnerCell, StageTags, WinMeter } from './cells';export function PipelinePage() { return ( <AccountPipeline workspace="Fernbrook" user={{ id: 'me', name: 'Bruno Delorence', team: 'strategic' }} onOpenAccount={(account) => console.log('Open', account.name)} autoplay={false} /> );}// Or a cell on its own:export function DealOdds() { return <WinMeter value={31} before={58} />;}Each state below is a live instance, locked so you can study it.
The pieces it is built from, each with its measurements read live.
Below are variations of this component, each live, with its code.
Win probability
The meter on the red-to-green scale and in its band’s colour, a drop and a jump flagged against two weeks ago, and an account not scored yet.
Activity trend
Twelve weeks of touches read by the cell: steady, rising, a single burst in amber, cooling off in red, and gone quiet, each with its reading beside the bars.
Segment and stage
One tag, a segment with its stage, more behind a +2 popover, a churn-risk flag, and a cell with room for three.
Account owner
An illustrated face, initials when there is no drawing, an account shared by three, an owner out of office, and one waiting to be assigned.
A sales team’s book of accounts in one table. Each row shows the company’s segment and stage as tags, its owner’s face, open deals and pipeline, the odds of winning as a row of segments from red to green, and twelve weeks of activity as small bars. The cells read their own data: a drop of fifteen points or more keeps the lost segments as red outlines, a burst of activity turns amber, a cooling end turns red, an owner who is away gets a chip. The sidebar picks a team, a region or the slipping deals; the tabs swap the money column; the footer adds totals over the rows in view or the ones selected. Every cell is exported on its own. Light and dark.
- The win probability is twenty segments in a track. On the scale tone each segment takes its colour from where it sits (red under 30%, amber under 60%, green above), so a longer fill reaches the greener end; the band tone paints the whole fill in its band’s colour. Given the figure two weeks ago, a swing of fifteen points or more keeps the lost segments as red outlines (or lights the gained ones) and adds a chip with the change.
- The activity trend is twelve bars whose height is a custom property, the week over the run’s busiest. readTrend reads the run: a week three deviations over the others is a burst (amber, with a dot), a last three weeks at half the rest is cooling (red), two or more empty weeks at the end are quiet (flat dashes). Weeks at or over the median are bright, the rest dim.
- Segment and stage tags take one of six tones. Past two, a +N button opens the rest in a native popover, in the top layer, so the table’s scrolling never clips it; it is placed from the button’s box each time it opens and closes on Escape or a press elsewhere.
- Known owners use distinct local editorial photographs. Theo shares the earlier portrait and Bruno uses his existing real project photo. Unknown people keep initials on a tint picked from their name. Co-owners stack behind, an owner who is away gets a dot and an Away chip, and an account with no owner shows a dashed ring that opens a menu of people.
- The sidebar picks the rows: every company, a team’s, a region’s, or the slipping ones (odds down fifteen, activity cooling or quiet, or tagged Churn risk). The tabs swap the money column for the open pipeline, the average deal or the pipeline weighted by its odds; the toolbar sorts and filters by owner, tag and last interaction, and the headers sort too.
- The footer’s calculations are toggles: the total of the money column, the average odds, and one more from Add Calculation (median odds, open deals, accounts at risk). With rows selected, they measure only those. New Company puts an editable row at the top; Export saves the rows in view as CSV; a row’s menu logs a touch or removes it, with Undo.
- The table scrolls inside its own box with the checkbox and company held at its left. Under 760 px of stage the sidebar becomes a drawer behind a menu button and the footer folds into two columns.
- While on screen and untouched, a demo pointer sorts by the odds, turns on the totals, opens the slipping deals and a row’s tags, selects two rows and filters by an owner. Any real input hands it over; it comes back after 9 s of quiet.
| Prop | Type | Default | Description |
|---|---|---|---|
accounts | Account[] | a book of twenty | The companies: name, region, tags, owner and co-owners, open deals, pipeline value, win probability now and two weeks ago, twelve weeks of touches and the last interaction. |
owners | Owner[] | twelve people in three teams | Everyone who can own an account: name, team, an optional face and an away date. |
workspace | string | 'Fernbrook' | The app’s name beside its mark. |
user | Owner | Bruno Delorence | Who is signed in, at the top right. |
onOpenAccount | (account: Account) => void | — | Called when a company’s name is pressed. |
autoplay | boolean | true | While on screen and untouched, a demo pointer shows the main interactions. Any real input stops it. |
defaultState | AccountPipelineState | — | Opens in a given moment, held still (no demo): the view (all, a team, a region, slipping, or an empty page), the tab, the sort, an owner or stage filter, the rows selected, the footer’s calculations, an open menu (sort, owner, a row’s actions…), a new company being named, the drawer open. |
colorScheme | 'light' | 'dark' | 'system' | — | Light or dark colours, or the reader’s; without it, the page’s color-scheme. |
className | string | — | Classes for the stage. |
Cells in words
Every cell says in words what it draws, in text kept for screen readers: 31% win probability, at risk, down 27 points in two weeks. The segments and bars are hidden from assistive technology. On screen the figure is always written, and a swing adds outlines and a chip with an arrow, so colour is never the only signal (WCAG 1.4.1, Use of colour).
Table structure
- Each company’s name is its row’s header (
th scope="row") and the columns have headers, so a cell is read with its company and its column (WCAG 1.3.1, Info and relationships). - The sortable headers carry
aria-sorton the column in use, ascending or descending. - The checkboxes are
role="checkbox"buttons; the header one is mixed while only some rows are chosen.
Keyboard
- The tabs are a tablist moved with the arrow keys.
- The filters, the row actions, the notifications and Add Calculation are menu buttons: their menus move with the arrows, Home and End, and close on Escape with focus back on their button.
- The +N tags open a native popover, which closes on Escape or a press elsewhere.
Status messages
The count of rows in view, or selected, is in a polite live region, and every change to the data (a company added, removed or handed to an owner, a touch logged, an export) is reported in a status toast, so it is heard without moving focus (WCAG 4.1.3, Status messages).
Timing
- A toast that only reports a change fades after 5.2 s. One that offers Undo has no time limit: it stays until Undo is pressed, Escape is pressed on it, or the next change replaces it (WCAG 2.2.1, Timing adjustable).
- Removing a company moves focus to the actions of the row after it. Undo moves it back to the restored row’s actions; Escape on the toast leaves it on the row after (WCAG 2.4.3, Focus order).
- The demo pointer stops for good at the first touch, key, wheel or pointer move, and doesn’t come back until the table mounts again (WCAG 2.2.2, Pause, stop, hide).
Contrast
Every word holds 4.5:1 on the surface under it in both schemes, the quietest captions and menu hints included, and the focus outline and checkbox edges hold 3:1 (WCAG 1.4.3 and 1.4.11). The win meter’s segments sit beside the written figure, which carries the same reading.
In this build
- The sidebar is a navigation with aria-current on its view; the table has column headers that sort (aria-sort), and each company’s name is its row’s header.
- Every cell says in words what it draws: “31% win probability, at risk, down 27 points in two weeks”, “Activity: 1 touches last week, cooling”, the owners’ names and when one is back. The segments and bars themselves are hidden from assistive technology.
- The tabs are a tablist moved with the arrow keys. The filters, the row actions, the notifications and Add Calculation are menu buttons; their menus move with the arrows, Home and End, and close on Escape with the focus back on their button. The +N tags open a native popover.
- The checkboxes are role="checkbox" buttons; the header one is mixed while some rows are chosen. The count of rows in view, or selected, is in a polite live region, and every change is reported in a status toast.
- Under reduced motion nothing slides or fades and the demo never plays. The demo pointer is decorative.
The complete source behind this demo. Open source under the MIT license, © 2026 Bruno Delorence: copy it, change it, ship it.
// Copyright (c) 2026 Bruno Delorence. MIT License.'use client';import { useEffect, useEffectEvent, useId, useLayoutEffect, useMemo, useRef, useState, type ReactNode,} from 'react';import { ActivityBars, OwnerCell, StageTags, WinMeter, Avatar, readTrend } from './cells';import { ACCOUNTS, OWNERS, REGION_NAME, SWING, TAGS, TEAM_NAME, TODAY, daysAgo,// Copyright (c) 2026 Bruno Delorence. MIT License.'use client';import { useId, useRef, type ReactNode, type ToggleEvent } from 'react';import { SWING, TAG_TONE, initials, shortDate, type Owner, type Tag } from './data';import { FaceArt, Icon } from './glyphs';import styles from './account-pipeline.module.css';import { OWNER_PHOTOS, portraitSet } from './portraits';/* * The table's cells, each usable on its own: the win probability meter, the activity bars, the * segment and stage tags, and the account owner. Each one reads its data and draws what stands * out (a swing in the odds, a spike or a cooling in activity, a tag that signals risk, an owner * who is away) without being told. CellColumn shows a column of them outside the table. */// ---- Win probability ------------------------------------------------------------------------------export type WinBand = 'low' | 'mid' | 'high';/** Under 35 is low, under 60 mid, the rest high. */export const bandOf = (value: number): WinBand => value < 35 ? 'low' : value < 60 ? 'mid' : 'high';/* Account pipeline (account-pipeline.tsx): a CRM window on a grey stage, near-black by night and white by day. A sidebar with the app's mark, the views and a trial card; the main column holds the title bar, the tabs, the toolbar of filters, the table and its footer of calculations. The table scrolls inside its own box, the checkbox and Companies columns held at its left. Under 760 px of stage the sidebar becomes a drawer behind a menu button. Colours are the tokens below, light-dark(light, dark) where the two differ: the component takes the color-scheme it inherits from the page, or the one its colorScheme prop sets (data-color-scheme). The cells (cells.tsx) share them, and CellColumn carries them too. */.root,.cellColumn { --stage: #e9e9ec; --window: #ffffff; --sidebar: #f8f8f9; --line: #ececef; --row-line: #f0f0f2; --ink: #18181b; --ink-2: #6d6d75; --ink-3: #6d6d73; --hover: #f4f4f6; --current: #ffffff; --current-edge: #e4e4e8;// Copyright (c) 2026 Bruno Delorence. MIT License./* * The book of accounts the pipeline opens with: twenty companies, the twelve people who own them * and the tags their deals carry. Every name is made up. Dates are read against TODAY, so the * table looks the same on every load. */export type Region = 'na' | 'emea' | 'apac';export type Team = 'strategic' | 'mid' | 'sdr';export type Tag = | 'Enterprise' | 'Mid-market' | 'SMB' | 'Strategic' | 'New logo' | 'Upsell' | 'Expansion' | 'Renewal' | 'Pilot' | 'Co-sell' | 'Land & expand' | 'Churn risk';// Copyright (c) 2026 Bruno Delorence. MIT License.// Fictitious editorial identities; Theo reuses his existing photo, and Bruno uses his real photo.export const OWNER_PHOTOS: Record<string, string> = Object.fromEntries( [ 'ana', 'theo', 'priya', 'kenji', 'jonah', 'lucia', 'amara', 'felix', 'sofia', 'marcus', 'yara', 'diego', 'me', ].map((id) => [ id, `/experiments/visual-revision/v2/people/${id === 'me' ? 'bruno' : id}-192.webp`, ]),);export const portraitSet = (src: string) => src.replace('-192.webp', '-96.webp') +// Copyright (c) 2026 Bruno Delorence. MIT License.'use client';import { useEffect, useLayoutEffect, useRef, useState, type KeyboardEvent as ReactKeyboardEvent, type ReactNode,} from 'react';import { Icon } from './glyphs';import styles from './account-pipeline.module.css';/* * The menus: placed on the stage under their trigger (over it when there is no room below), in * the stage's own px, since a gallery card may scale the whole stage. The arrows, Home and End * move between items; Escape closes and gives the focus back; a press elsewhere closes. */const ITEMS = '[role="menuitem"], [role="menuitemradio"]';export function Menu({// Copyright (c) 2026 Bruno Delorence. MIT License.import type { Face } from './data';/* * The drawings: the interface's line icons (a 24-unit box, drawn with currentColor), the app's * mark, and the owners' illustrated faces. */const PATHS = { building: 'M4 21V5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v16M14 9h5a1 1 0 0 1 1 1v11M3 21h18M8 8h2M8 12h2M8 16h2', board: 'M4 5h16v14H4zM9.5 5v14M14.5 5v14', chart: 'M5 20V12M10 20V6M15 20v-9M20 20V9', list: 'M9 6h11M9 12h11M9 18h11M4.5 6h.01M4.5 12h.01M4.5 18h.01', contacts: 'M5 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5zM9 4v16M13 10.5a1.8 1.8 0 1 0 0-.01M10.5 16a2.6 2.6 0 0 1 5 0', mail: 'M3.5 6.5h17v11h-17zM4 7l8 6 8-6', target: 'M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM12 16.5a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9zM12 12.5a.5.5 0 1 0 0-1', compass: 'M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM15.5 8.5l-2 5-5 2 2-5z', users: 'M9 11a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7zM3 20a6 6 0 0 1 12 0M16 4.5a3.5 3.5 0 0 1 0 6.5M18 14.5a6 6 0 0 1 3 5.5', forecast: 'M4 20h16M6 20v-6h3v6M10.5 20V9h3v11M15 20v-8h3v8',// Copyright (c) 2026 Bruno Delorence. MIT License.'use client';import type { CSSProperties, Ref } from 'react';/* * The demo's pointer, and the steps that move it. A demo is a script of awaited steps: wait, or * glide the pointer somewhere. Stopping the demo (the reader takes over, or it scrolls away) ends * the step in progress at once: its promise rejects, which ends the script right there, and the * pointer fades out. * * Each glide is a curved flight played by the Web Animations API, so nothing runs frame by frame. * The points of the flight are handed to whoever wants to move along with it. The arrow and the * hand are HTML boxes * that swap by their visibility: a change of style inside an SVG would lay the SVG out again. */export type Point = { x: number; y: number };/** A glide's path and timing, for an animation that plays along with it. */export type Flight = { points: Point[]; timing: KeyframeAnimationOptions };export type Demo = {// Copyright (c) 2026 Bruno Delorence. MIT License.'use client';import { useCallback, useEffect, useRef, useState } from 'react';/* * When a demo may play on its own: while part of it is on screen and the tab is visible, never * under reduced motion, and never again once the reader has used it. `take()` hands it to the * reader for good: the first real input stops the demo until the component mounts again (WCAG * 2.2.2). */export function useAutoplay<T extends HTMLElement>() { const ref = useRef<T>(null); const [visible, setVisible] = useState(false); const [reduced, setReduced] = useState(true); const [taken, setTaken] = useState(false); useEffect(() => { const element = ref.current; if (!element) return; let onScreen = false; const update = () => setVisible(onScreen && !document.hidden); const observer = new IntersectionObserver(