Performance Waterfall
A network request waterfall chart listing a page load's requests with their method, a cascading bar showing timing offset and duration positioned within a fixed-width track, and the numeric duration in milliseconds. Bars are colored by a fast/medium/slow duration bucket with a small legend above the chart. Built for performance reports and debugging guides.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/performance-waterfall.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/devtools/devtools5.tsx instead.
Usage
The file also exports devtools5Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Devtools5, devtools5Demo } from "@/components/blocks/devtools/devtools5"; export default function Page() { return <Devtools5 {...devtools5Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Performance Waterfall" | Section heading. |
| description | string | undefined | Section intro text below the heading. |
| requests | WaterfallRequest[] | [] | Request rows rendered top to bottom in the order given. |
| className | string | none | Extra classes for the outer section element. |
Types
type WaterfallRequest = { name: string; method: string; offsetPercent: number; durationPercent: number; durationMs: number; };
Behavior notes
- Entirely static; no client-side interactivity, and no real network measurement. offsetPercent and durationPercent are fixed literals positioned with inline marginLeft/width styles against a fixed-width track.
- Bar color is derived from durationMs at render time (fast <100ms=emerald, medium 100-500ms=amber, slow >500ms=red) via plain arithmetic, not from a separate bucket prop, so color always stays in sync with the displayed duration.
- offsetPercent and durationPercent are independent of durationMs; the caller is responsible for keeping the visual bar roughly proportional to the numeric value, the component does not compute one from the other.
- The request name column has a fixed width and truncates long paths with an ellipsis rather than wrapping, to keep every bar's track aligned.
More DevTools Blocks
View all →api-endpoints-sample-call
API Endpoints With Sample Call
Reference list of API endpoints paired with a live sample request and response panel.
cicd-pipeline-status
CI/CD Pipeline Status
Recent CI/CD pipeline runs with per-stage status chips and overall run badges.
code-diff-viewer
Code Diff Viewer
Unified code diff panel with a file header change summary and colored addition/deletion lines.
keyboard-shortcuts-reference
Keyboard Shortcuts Reference
Grouped keyboard shortcut reference with keycap-styled key combos.
service-health-board
Service Health Board
Infrastructure status board with a live summary strip and per-service uptime, latency, and health.
queue-monitor
Queue Monitor
Background job queue monitor with processed/pending/failed counts and a per-queue capacity bar.