suiss/ui · AI
File Tree
The files an agent changed, shown as a folder tree you can open, with the selected file marked.
File Tree shows the files the agent changed as folders you can open. A folder is a Collapsible and a file is a Button. For a single file the agent read or edited, use a Tool row instead.
Installation
File Tree is built with the Collapsible and Button components.
Or use the suiss/ui CLI:
Usage
Render nodes recursively, and nest each folder's children in its CollapsibleContent.
A file is a ghost button that selects it. Set aria-current on the selected file.
API Reference
See Collapsible and Button.
Accessibility
- Each folder is a button with
aria-expanded, and opens and closes with Enter or Space. - Mark the selected file with
aria-currentas well as a background, so the selection is announced. - The chevron and the folder and file icons are decorative; the name is the accessible label.