---
title: VirtualTreeProvider
description: "Provides a filesystem tree and desktop display settings."
---

```tsx
import { VirtualTreeProvider } from 'filedom';

<VirtualTreeProvider showLabels={false} hideExtensions>
  {children}
</VirtualTreeProvider>
```

Read the tree with [useVirtualTree](/docs/reference/hooks/use-virtual-tree) and the display settings with [useDesktopSettings](/docs/reference/hooks/use-desktop-settings).

The provider sets Finder's desktop label visibility to `showLabels` and turns labels back on when it unmounts.

## Props

| Prop | Type | Default | Description |
| - | - | - | - |
| `children` | `React.ReactNode` | - | Components using the tree or display settings. |
| `desktopPath?` | `string` | - | Directory to scan. Defaults to ~/Desktop. |
| `showLabels?` | `boolean` | - | Show desktop icon labels. Default false. |
| `hideExtensions?` | `boolean` | - | Value of hideExtensions returned by useDesktopSettings. Default false. |
