File Tree
A nested directory: expandable Folder rows and File leaves, indented by depth.
Default
Tree provides depth. Folder toggles its children. default-open expands a branch on first paint.
File types
type is edge-function, lambda, or middleware. Each paints a badge and a tinted icon.
Links
href turns the file row into an anchor. Use it when the name should open a source file or docs page.
- drawer.vue
- fieldset.vue
- file-tree.vue
Best practices
- File Tree illustrates a layout in docs or a deploy artifact. It is not a full IDE explorer — no multi-select, rename, or drag.
- Always wrap rows in
Tree. Depth indent comes from provide/inject; a Folder or File rendered alone sits at the root. - Open the branches the reader must see with
default-open. Leave the rest collapsed so the example stays short. typeis onlyedge-function,lambda, ormiddleware. Regular files omit it.- Set
hrefwhen the name is a destination. Plain files stay a non-interactive span.