# Request Waterfall

> A network waterfall without the noise: a type icon per request, bars that draw in the order requests started, and hovering one pulls it apart into DNS, connect, TLS, waiting and download, draws guides at its start and end and dims the rest. Opening a row lays out each phase on the same time axis, and hovering a marker dims every request that finished after it.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Components › Data Display |
| Live preview | https://uibrik.com/components/request-waterfall |
| Writes | 1 file into `components/uibrik/request-waterfall/` |
| Packages | `@tabler/icons-react`, `motion` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 25, 2026 |

## Add it

```bash
npx shadcn@latest add https://uibrik.com/r/request-waterfall.json
```

With the `@uibrik` namespace in `components.json` ([setup](https://uibrik.com/docs/installation.md)): `npx shadcn@latest add @uibrik/request-waterfall`.

Can't run commands? https://uibrik.com/components/request-waterfall/prompt.txt has every file verbatim, with the setup steps, ready for an assistant to write.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { RequestWaterfall } from "@/components/uibrik/request-waterfall/request-waterfall";

const requests = [
  { name: "acme.shop", type: "document", size: 18400, start: 0, status: 200, phases: { dns: 28, connect: 34, tls: 46, waiting: 142, download: 18 } },
  { name: "app.css", type: "style", size: 32800, start: 276, status: 200, phases: { queued: 4, waiting: 58, download: 22 } },
  // …10 more
];

const markers = [
  { label: "DOMContentLoaded", time: 612 },
  { label: "Load", time: 1184 },
];

<RequestWaterfall
  title="Network"
  color="#2f7cf6"
  showSize
  width={640}
  requests={requests}
  markers={markers}
  defaultOpen={null}
  // open={0}
  // onOpenChange={(index) => {}}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/request-waterfall.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `title` | `string` | `"Network"` | Heading above the totals. |
| `color` | `string` | `"#2f7cf6"` | Colour the phases are shaded from. |
| `showSize` | `boolean` | `true` | Show transfer sizes when there is room. |
| `width` | `number` | `640` | Width of the card; never wider than its container. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `requests` | `{ name: string; type: string; size?: number; start: number; status?: number; phases: { queued?, dns?, connect?, tls?, waiting?, download?: number } }[]` |  | One row per request. start and phases are in ms; statuses of 400 and up are marked. |
| `markers` | `{ label: string; time: number }[]` |  | Dashed lines across the rows, e.g. DOMContentLoaded and Load. |
| `open / onOpenChange` | `number \| null / (index) => void` |  | Index of the open row, controlled. |
| `defaultOpen` | `number \| null` | `null` | Open row on mount when uncontrolled. |
| `className` | `string` |  | Classes for the wrapper. |

## Where it fits

- **Performance and observability tools**: Phases that pull apart on hover show where a request spent its time without a separate panel. Pairs with [Stack Trace](https://uibrik.com/components/stack-trace.md).
- **Developer tool landing pages**: A waterfall that draws itself in explains page loading in a few seconds. Pairs with [Performance Meter](https://uibrik.com/components/performance-meter.md) (Pro).
- **API and CDN dashboards**: Markers for DOMContentLoaded and Load put every request in the context of the page.

## Same shelf: Data Display

- [Stack Trace](https://uibrik.com/components/stack-trace.md): An error card that stays small until you need it: the error, how often it fired and a bar per hour, with the frame that threw on top. A click opens its source with the failing line marked, and the rest of the stack unfolds frame by frame with library frames folded away.
- [Strike Todos](https://uibrik.com/components/strike-todos.md): A plain to-do list: checking an item draws a line through it, and unchecking wipes the line away.
- [Swipe Rows](https://uibrik.com/components/swipe-rows.md) (Pro): A list whose rows swipe open to reveal actions, with iOS physics: buttons fan out from under the row, a full swipe runs the edge action and the list closes the gap.
- [Tree View](https://uibrik.com/components/tree-view.md): A file and folder tree with folders that ease open, guide lines, a sliding selection and full tree keyboard control.
- [Bulk Select](https://uibrik.com/components/bulk-select.md) (Pro): A selectable list with a floating action bar: shift-click ticks a range in a wave, the count pill widens into a toolbar, pointing at an action tints the rows it will touch, and archived rows collapse as their avatars fly into the bar.
- [Code Block](https://uibrik.com/components/code-block.md): A code block that shows plain text at once and colours it in place with on-demand Shiki, with tabs that sync across blocks, marked lines, diffs, collapsing and a copy button.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/request-waterfall/` so the import paths keep resolving.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
