Skip to content
filedom
Esc
↑↓navigate↵open⌘Jpreview
On this page

VirtualTreeProvider

Provides a filesystem tree and desktop display settings.

import { VirtualTreeProvider } from 'filedom';

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

Read the tree with useVirtualTree and the display settings with useDesktopSettings.

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

Props

PropType
childrenReact.ReactNode

Components using the tree or display settings.

TypeReact.ReactNode
desktopPath?string

Directory to scan. Defaults to ~/Desktop.

Typestring
showLabels?boolean

Show desktop icon labels. Default false.

Typeboolean
hideExtensions?boolean

Value of hideExtensions returned by useDesktopSettings. Default false.

Typeboolean

Was this page helpful?