Waterfall
A trace, or a page’s requests, as bars on one time axis. Each span opens to show the spans inside it, and the one under the pointer stays bright while the rest step back.
Examples
Default
Point at a span to light it and read its times, press it to pick it, and open a span to see the spans inside it.
Requests
A flat list works too: a page’s requests, each a row, coloured by what they fetch.
Scrolling
Give the list a height and a long trace scrolls under its axis, which stays in view.
Loading
loading shows rows that wait for the spans, after a moment and for long enough to read.
Installation
npx shadcn@latest add https://kinoui.com/r/waterfall.json- Files
lib/announce.tsxlib/reduce-motion.tslib/scroll.tslib/refs.tslib/resize.tslib/swap.tsxlib/popup.tslib/glide.tsxcomponents/kino/tooltip.tsxlib/cut.tsxcomponents/kino/spinner.tsxcomponents/kino/button.tsxlib/chart-math.tslib/controllable.tslib/number-format.tslib/chart-core.tsxlib/run-progress.tslib/highlight.tslib/notice.tsxlib/placeholder.tslib/roll.tsxcomponents/kino/collapsible.tsxcomponents/kino/separator.tsxlib/menu.tsxlib/pick.tscomponents/kino/tree.tsxcomponents/kino/waterfall.tsx- Packages
@base-ui/reactclass-variance-authorityd3-array- Global CSS
- the feels, the density tokens, the shape tokens and the success and warning colours
New to Kino? Installation covers what your project needs first and the @kino namespace.
The CLI keeps any of these colours your project already has, such as the chart colours shadcn init writes. To use Kino’s, set them in your global CSS:
:root { --chart-1: oklch(0.62 0.16 250); --chart-2: oklch(0.54 0.18 257); --chart-3: oklch(0.47 0.21 263); --chart-4: oklch(0.4 0.19 268); --chart-5: oklch(0.33 0.15 272);}.dark { --chart-1: oklch(0.82 0.09 245); --chart-2: oklch(0.74 0.13 250); --chart-3: oklch(0.67 0.17 257); --chart-4: oklch(0.61 0.19 263); --chart-5: oklch(0.55 0.2 268);}API reference
Waterfall
WaterfallList
WaterfallSpan
Data attributes
CSS variables
Accessibility
- The list is the WAI-ARIA tree pattern, through Kino’s Tree: it is one stop in the tab order; Up and Down move between the spans that show, Right opens a span and Left closes it or goes to its parent, Home and End go to the ends, and typing a name goes to the span it starts.
- Each span’s name says its kind, when it starts, how long it lasts and, when it failed, what went wrong; the bar and the axis are hidden from screen readers.
- A failed span shows an icon beside its name as well as its colour, and a hidden kind keeps an outline that forced colours keep too.
- Loading, the spans arriving and an empty trace are announced in a status region.
- A touch on a span lights it and opens its tooltip, as the pointer does.
- When the system asks for less motion, bars fade in where they are and nothing slides.