shadcn.io is not affiliated with official shadcn/ui
Company History Timeline Block for React Aria
A cap table's six events on a rail, each with a three-part ownership bar for founders, team and investors; press an event to pin its bar beside the latest and read how the split moved.
Installation
Overview
See how ownership changed with this company-history timeline for React with React Aria. It is written for Sharepath, a fictional cap-table tool, and tells a company's story as dilution. A hairline frame with a plus mark on each corner holds a comparison figure over a rail of six events, newest first: Founding, Option pool, Seed, Series A, Team grants and Secondary sale. Each event is a button with a three-part ownership bar for founders, team and investors (foreground at full, over half and a quarter strength), the shares in all and the percentages beside it. The percentages are worked out from typed share counts by largest remainder, so they always add up to 100. Pressing an event pins it: the figure then draws the pinned bar above the latest one and says what moved, "Founders 100% → 61%, team 0% → 14%, investors 0% → 25%". Pressing it again unpins. It is built from Guides with native buttons (aria-pressed) and CSS for the bars. Example cap table.
FAQ
How do I change the events?
Edit EVENTS at the top of the file, oldest first: an id, a name, an ISO day on, a line of text and change, the shares added to founders, team and investors (negative when sold). buildHeld() adds them up into the holdings after each event.
Why do the percentages always add up to 100?
percentsOf() takes the whole-percent floor of each share and gives the missing points to the holders with the largest remainders. Rounding each share on its own can total 99 or 101; this cannot.
How does pinning work?
The pinned event is one string in state. The figure draws that event's bar and the latest event's bar with the same component and writes the change from the two percentage lists. Pressing the pinned event again clears it, and the figure then says to pick one.
What stays in the page?
Only the pin. Nothing is saved or sent, and the numbers are an example, not a record of any company. To make it real, build EVENTS from your cap-table export.