File Tree
A customizable file tree component for displaying hierarchical file structures in your documentation.
The File Tree component allows you to display hierarchical file structures in your documentation with collapsible folders and files.
Basic Usage
Render As:
App.tsx
index.tsx
Button.tsx
Card.tsx
Home.tsx
About.tsx
Props
- Files
- Folder
- File
Best Practices
- Keep the nesting level reasonable (recommended max 3-4 levels deep)
- Use clear and descriptive names for files and folders
- Consider the user experience when displaying large file structures
- Use consistent naming conventions throughout your file tree
Accessibility
The File Tree component includes built-in accessibility features:
- Keyboard navigation support
- ARIA attributes for screen readers
- Focus management for interactive elements
- High contrast mode support
Last updated May 5, 2026