AppFileTree

A file tree (APG Tree View): nested folders and files with one Tab stop. Up and Down move through the visible items, Right opens a folder or steps into it, Left closes it or steps out to the parent, Home and End jump to the ends, typing jumps to the next item starting with the typed text, and * opens every folder beside the current one. Enter or a click picks an item and opens or closes a folder; Space only picks. Folders can load their children the first time they open.

Install: pnpm add-component AppFileTree

Basic usage

Folders show a folder icon that opens with them, files a document; a node can bring its own icon. Emits select(node), toggle(node, open) and, when load rejects, error(node, error).

Lazy folders

Give folders an empty children array and a load function: the first open shows a spinner (aria-busy on the item) and the returned children appear when it resolves. A folder that loads nothing says so.

API