# Drive Explorer block

> Drive Explorer with Folder Tree Rail and Switchable List or Grid Views

Drive Explorer is a full-height file manager module for browsing team storage: a headless-tree folder rail with secondary scope links and a storage meter, a folders band above the browse surface, a ReUI DataGrid list with owner, type, size and modified columns, a switchable card grid, a view settings popover for density, sort and visible properties, bulk selection actions, and separate empty states for an empty folder and a filtered miss.

- Type: Pro block
- Category: [Files](https://web.dev.reui.io/blocks/solutions/files.md)
- Page: https://web.dev.reui.io/blocks/solutions/files/solution-files-1
- MCP: `get_block("solution-files-1")`
- Built with: Alert Dialog, Avatar, Badge, Breadcrumb, Button, Card, Checkbox, Collapsible, Context Menu, Data Grid, Dialog, Dropdown Menu, Empty, Field, Icon Stack, Icon Tile, Input, Input Group, Item, Popover, Progress, Scroll Area, Select, Separator, Sheet, Tabs, Timeline, Toggle Group, Tooltip, Tree
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## Best for

A drive that acts on its files, with retryable uploads, invite and link sharing, a move picker, version history and a restorable bin

## Agent notes

- Sample files, versions and share lists come from `DRIVE_TREE`, `versionsFor`, `defaultPrincipals` and `SHARE_TEAMS`; edits live in `useState` only
- File open, downloads, bulk share, `restoreVersion` and `onGetStorage` only show a toast, so wire each to your storage API
- A `setInterval` ticker in `DriveExplorer` fakes upload progress and fails 12% of transfers at random; replace it with a real upload

## When not to use

- A shared folder hierarchy whose rows reparent by pointer, with tri-state folder checkboxes: use [Shared Drive Folders](https://web.dev.reui.io/blocks/data-grid/drag-drop/data-grid-drag-drop-4.md) (`get_block("data-grid-drag-drop-4")`)
- A bare outline of nested items to pick from, with no file listing, sharing or bin: use [Tree](https://web.dev.reui.io/components/tree.md) (`get_component("tree")`)

## Third-party libraries

- TanStack Table v9: [API reference](https://tanstack.com/table/v9/docs/framework/react/reference/index), [docs](https://tanstack.com/table/v9/docs/framework/react/quick-start)
- Headless Tree v1: [API reference](https://headless-tree.lukasbach.com/api/core/), [docs](https://headless-tree.lukasbach.com/getstarted/)
- Sonner v2: [API reference](https://sonner.emilkowal.ski/toast), [docs](https://sonner.emilkowal.ski/getting-started)

## Install

```bash
npx shadcn@latest add @reui/solution-files-1
```

## About Files blocks

### When to use

- A team drive page: a folder tree beside the open folder's contents as a list or card grid
- Shared studio or agency storage where people upload, share by link, move and restore deleted items

### When not to use

- A nested outline or folder picker alone, with no listing of the open folder beside it: use [Tree](https://web.dev.reui.io/components/tree.md) (`get_component("tree")`)
- One nested table of folders whose rows move into other folders by pointer: use the [Drag & Drop blocks](https://web.dev.reui.io/blocks/data-grid/drag-drop.md)
- A drop zone or picker for attachments inside a form, with no drive to browse: use [File Upload](https://web.dev.reui.io/components/file-upload.md) (`get_component("file-upload")`)

### Agent notes

- page.tsx wraps each block in an `h-svh` `main` with padding and the block fills it with `h-full`; inside an app shell give it a bounded height

Every ReUI item has a twin like this one; the index is https://web.dev.reui.io/llms.txt. Agents with the ReUI MCP (https://web.dev.reui.io/docs/mcp) get the same guidance from the getters named above.
