Feature Library
0.43 CPU ms
A still of the Tree view demo
Still
The live demo starts when it’s in view.Click or Tab into the tree · arrows, Enter, type to jump, F2 renames · drag rows (long-press on touch) or Alt+arrows to move

A virtualised tree for files, folders, outlines and categories.

What it costs a frame

0.43 ms
GPU
not used
CPU, median
0.43 ms
CPU, 95th pct
2.44 ms
Draw calls
0
Weight
Light

Measured 7 November 2026 on 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 156, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: Measured on the 50,000-item archive, three collections open: the tree scrolls 41 px every frame and redraws every row in view from scratch (a real scroll redraws only the rows that come in), opens or closes a folder every 24 frames and runs a filter over all 50,025 names every 150 frames, clearing it 40 frames later. At rest it does nothing. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
unknown GPU · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring toolnot timed0.432.44
apple · Apple A19 Proin a browser tab · 16 November 2026not timed0.781.98
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026not timed0.761.10

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

What it needs

Renders with
DOM and CSSPlain DOM and CSS: every current browser.
Your browser
Runs hereNo WebGPU needed
Depends on
NothingNo other packages

What it’s for

  1. File and folder browsers
  2. Project and document outlines
  3. Category and tag pickers with checkboxes
  4. Settings and navigation trees
  5. Org charts and nested lists people rearrange
  6. Large hierarchies loaded from a server level by level

Pitfalls, in brief

  1. Give the host a height (a flex child, a grid row or a fixed size): the tree scrolls inside it and draws only the rows that fit.
  2. Every row is the same height, measured once from the CSS (and again when the text size changes).
  3. Ids must be unique across the whole tree, and stable: open, selected and checked state, the focus and setNodes all go by id.
  4. The filter searches loaded nodes only.
  5. Nothing can be dropped or pasted into a node whose children are not loaded yet.
4 more in brief
  1. onMove and onRename run before the change: return false (or a message, for a rename) to refuse it.
  2. Checkboxes replace selection (aria-checked, not aria-selected): the pattern does not allow both on one tree.
  3. Alt+Left and Alt+Right are the browser’s Back and Forward.
  4. Very large trees: the scroll height is rows × row height, and browsers cap an element’s height at somewhere between about 17 and 33 million pixels, so about half a million rows at 2rem.
9 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

Written for the library. Fully custom code.

WAI-ARIA Authoring Practices Guide (W3C): the tree view pattern: roles, roving tabindex, the arrow, Home, End, * and type-ahead keys, aria-expanded, aria-selected or aria-checked (not both), and aria-level, aria-setsize and aria-posinset given on every row of a flat, virtualised tree

Unicode Normalization Forms (Unicode Standard Annex #15): canonical decomposition (NFD) with the combining marks dropped, so the filter finds “Café” with “cafe”

tree viewtreeviewfile browseroutlinevirtualisedvirtual scrollinglazy loadingfilterdrag and dropcheckboxestri-staterenameroving tabindexaria-levelkeyboardtouchrtlaccessibilitydomno dependencies

Near it in the frame