Icons
Lookup reference for icon sets, remaps, sprite sheets, and resolution order.
This page is the lookup reference for icon sets, icon remaps, sprite-sheet extension, and icon-specific configuration rules.
Entry points
Built-in set selection:
icons: 'minimal' | 'standard' | 'complete'minimalkeeps the visual noise lowstandardadds common language and file-type iconscompletehas the broadest built-in coverage, and is the default
Object configuration:
- use
FileTreeIconConfigwhen a string set is not enough - combine a base set with color toggles, slot remaps, or file-specific remaps
Configuration shape
Base set and color mode:
set?: 'minimal' | 'standard' | 'complete' | 'none'colored?: boolean
set: 'none' turns off the built-in file-type mappings. File rows still fall
back to the generic file icon. Remaps can replace that icon. When you pass
custom rules without a set, it defaults to 'none'.
Sprite-sheet extension:
spriteSheet?: string- supply an SVG string with
<symbol>definitions that remaps can target
Built-in slot remapping:
remap?: Record<string, RemappedIcon>- common slots:
file-tree-icon-chevron,file-tree-icon-file,file-tree-icon-dot(modified state),file-tree-icon-lock(locked path)
File-specific remapping:
byFileNamefor exact basename matches such aspackage.jsonbyFileNameContainsfor basename substring rules such asdockerfilebyFileExtensionfor extension rules without a leading dot, and for multi-part suffixes such asspec.ts
Resolution order
File icon lookup resolves in this order:
- exact basename match from
byFileName - basename-contains match from
byFileNameContains - extension match from
byFileExtension, and the more specific suffix wins - built-in set mapping
- generic file-slot remap or fallback
So spec.ts wins over ts when both rules exist.
RemappedIcon shape
RemappedIcon supports two forms:
- a string symbol id
- an object with
name, and optionalwidth,height, andviewBox
Use the object form when the replacement symbol needs non-default geometry metadata.
Sprite sheets and several trees
Each tree prefixes the symbol ids of its sprite sheet (the built-in set plus
icons.spriteSheet), so several trees in one document never resolve each
other’s icons. Names a sheet does not define resolve document-wide.
getBuiltInSpriteSheet(...) and createFileTreeIconResolver(...) expose the
built-in sheet and the lookup for custom rendering.
Runtime touchpoints
- pass the icon configuration to
createFileTree(...) - update it later with
setIcons(...)
For the lookup around those touchpoints, read Solid API and Model API.
Icon color interplay
Turn off the built-in colored icons with colored: false. The token lookup and
the fallback precedence for icon colors are in
Styling and theming.
Related pages
- Customize icons for the walkthrough
- Style and theme the tree for broader appearance changes