FileTree Component
Example source
import FileTree from 'starlight-plugin-icons/components/FileTree.astro'
<FileTree> - src - pages - index.astro - empty/ - **TODO.md** <span class="i-ph:warning-bold"></span> **important** file - package.json the <span class="i-material-icon-theme:nodejs"></span> package.json file</FileTree>
Rendered
Directorysrc
Directorypages
- index.astro
Directoryempty/
- …
- TODO.md important file
- package.json the package.json file
- Directories end with
/
or contain nested items. **README.md**
highlights an entry.- Text after the name becomes a comment:
README.md important
.
Customization
Section titled “Customization”CSS variables
Section titled “CSS variables”:root { --spi-filetree-icon-size: 1.1rem; --spi-filetree-icon-gap: 0.25rem;}
Example
Section titled “Example”:root { --spi-filetree-icon-size: 1.2rem; --spi-filetree-icon-gap: 0.5rem;}
Rendered
Directorysrc
- index.ts
- README.md