SaaS portfolio
Shown as Stackwise, a made-up product
A portfolio of SaaS products: each product's own screen as the hero over refracted glass, health index, paid seats, expansion MRR and an MRR chart.
Installation
pnpm dlx shadcn@latest add "https://propui.dev/r/stackwise-portfolio.json?token=…"Adds the piece to components/propui/06-stackwise-portfolio/ and installs motion. Needs a free account: sign in and the command includes your token. Fonts load from Prop UI; download the zip to self-host them.
When to use
Reach for it when
- A company that runs several SaaS products and wants one screen per product: MRR, users, retention and health.
- An investor or operator view where picking a product from a list repaints the whole page in its colour.
- Showing this week's subscription changes (new, expansion, contraction, churn) next to a monthly MRR table.
Something else fits when
- A single SaaS product's revenue and usage: SaaS revenue and usage is built around one product.
- A step-by-step process with a finish line: Customer onboarding shows progress through fixed steps.
- A marketing page about the product: use a hero section such as Catalogue studio hero.
Usage
Fills a full window: give it a container with a definite height.
import Piece from "@/components/propui/06-stackwise-portfolio/Section";
export default function Page() {
return (
<main className="h-dvh w-full overflow-hidden">
<Piece />
</main>
);
}Replace PRODUCTS in data.ts with your products and their monthly series. The hero, list, health index, paid seats, expansion MRR, activity feed and table are all computed from each product's series; the glass colours per product live in RAMP in Section.tsx.
Your data
Replace these and everything on screen follows.
PRODUCTSProduct[]- The product list, its two groups and the product shown everywhere else.
Product{ id; name; kind; group; hue; since; mau; retention; mrr; seats; expansion; health; accounts }- One product: its colour, headline figures and the series behind every card.
Product.mrrnumber[] (21 months)- MRR in the hero, the change since the first month, the MRR table and the size of activity events.
Product.seats, expansionnumber[] (12 months)- The paid seats and expansion MRR cards and their 12 columns; seats also fill the table.
Product.healthnumber[] (13 months)- The health index, its month-on-month and year-on-year change and the diverging bars.
Product.accounts{ name; status: "healthy" | "watch" | "risk" }[]- The top account logos and health dots in the hero, and names in the activity feed.
MONTHS{ short; year }[]- Month labels in the hero, the health axis and the table.
RAMP (Section.tsx)Record<id, { bg; deep; base; royal; mid; accent; ice; tint }>- The glass colours behind the hero for each product id.
Interactions
- Pick a product in the list to switch the hero, cards and revenue section to it.
- Search the list by product name or kind; groups with no match say so.
- Collapse or expand the Launching and Live groups.
- Press Watch in the hero to follow a product; it changes to Watching.
- Switch the revenue section between Activity and Table.
- In Table view, pick 12 months or since Feb 2025.
- Hover a top account logo to read its health as a tooltip.
- Move the pointer over the glass in the hero to light the blocks under it.
Keyboard
- Tab
- Move between the rail, Watch, search, group headers, products and view buttons.
- EnterorSpace
- Press the focused button: pick a product, toggle a group, switch view or range, watch.
Behaviour
Read from the code: roles, motion, breakpoints and what runs.
Accessibility
- Rail buttons have aria-label and the active one carries aria-current="page"; the selected product carries aria-current.
- Group headers use aria-expanded; Watch and the range buttons use aria-pressed.
- Activity and Table are buttons with role tab and aria-selected in a tablist; arrow keys are not handled.
- The new, expansion, contraction and churn bar is role img with a label listing each total; the same totals are in the legend as text.
- The search field has a label; account logos, glyphs, sparks and the glass are hidden from screen readers.
- Up and down figures carry a + or − sign as well as colour.
- Focus shows a 2px ink outline.
Motion
- Switching product rolls the big numbers to their new value over 0.9s, and bars and columns ease to their new height.
- The product name block slides out and the next one slides in; the hero ground fades to the new product's colour.
- The selected rail item, product and view slide a pill between them with a spring.
- Groups open and close with a height and opacity change; Activity and Table cross-fade.
- The glass behind the hero moves continuously in a WebGL canvas and reacts to the pointer.
- The piece sets MotionConfig reducedMotion="user", the rolling numbers jump straight to their value and the glass runs at a quarter of its speed.
Responsive
- Fills its container: a 76px rail, then the hero with a 330px product list to its right; the main area scrolls inside.
- At 1200px and below the product list moves under the hero and everything is one column.
- At 1100px and below the activity feed and the by-plan summary stack.
- At 760px and below the rail becomes a top bar without labels, the whole piece scrolls, the hero stacks its stats under the name, the cards go to one column, the range buttons hide, feed tags and times hide and the table scrolls sideways at 640px wide.
Performance
- The glass is one WebGL2 canvas with an animation frame loop that runs while the piece is mounted; it is not paused off screen.
- The canvas renders at no more than 2x device pixel ratio and resizes with a ResizeObserver.
- No images: account logos are drawn as inline SVG from the name; five local font files.
Notes for AI
Give your coding assistant the Markdown, not a screenshot.
- Keep figures in data.ts; derive changes, totals and the activity feed from the series rather than typing numbers into the markup.
- Every product id needs a RAMP entry in Section.tsx, or the hero has no glass colours.
- Every class is prefixed sw- and scoped under .sw, because section CSS loads globally.
- The piece fills its parent's height (height: 100%); give the parent a height, such as 100vh.
- The activity events are generated from each product's MRR; replace activity() in Section.tsx when you have real events.
/p/stackwise-portfolio/markdownThe whole library for assistants: llms.txt, or the MCP server in AI tools and MCP.