# Folder Peek

> A folder whose file previews rise and fan out on hover, fly out into a list when opened, and that takes files dropped onto it.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Components › Media |
| Live preview | https://uibrik.com/components/folder-peek |
| Writes | 1 file into `components/uibrik/folder-peek/` |
| Packages | `@tabler/icons-react`, `motion` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 9, 2026 |

## Add it

```bash
npx shadcn@latest add https://uibrik.com/r/folder-peek.json
```

With the `@uibrik` namespace in `components.json` ([setup](https://uibrik.com/docs/installation.md)): `npx shadcn@latest add @uibrik/folder-peek`.

Can't run commands? https://uibrik.com/components/folder-peek/prompt.txt has every file verbatim, with the setup steps, ready for an assistant to write.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { FolderPeek } from "@/components/uibrik/folder-peek/folder-peek";

const files = [
  { name: "Brand guidelines.pdf", meta: "2.4 MB" },
  { name: "Q3 roadmap.key", meta: "8.1 MB" },
  // …2 more
];

<FolderPeek
  name="Launch assets"
  color="#a1a1aa"
  rise={44}
  fan={7}
  tilt={22}
  parallax
  droppable
  maxRows={5}
  files={files}
  onSelect={(file, index) => {}}
  onAdd={(files) => {}}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/folder-peek.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `name` | `string` | `"Launch assets"` | Folder name, under the folder and atop the list. |
| `color` | `string` | `"#a1a1aa"` | Folder colour. The back is drawn a shade darker, the flap a shade lighter. |
| `rise` | `number` | `44` | How far the sheets rise on hover. |
| `fan` | `number` | `7` | How far the outer sheets turn as they fan. |
| `tilt` | `number` | `22` | How far the front flap tips forward on hover. |
| `parallax` | `boolean` | `true` | Lean the fanned sheets toward the cursor. |
| `droppable` | `boolean` | `true` | Accept files dropped on the folder or the open list. |
| `maxRows` | `number` | `5` | Rows the open list shows before it scrolls. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `files` | `{ name: string; meta?: string; kind?: "doc" \| "slides" \| "image" \| "text"; preview?: string }[]` | `4 sample files` | Files on mount, newest first. The first three are drawn as sheets, previewed by kind (inferred from the extension); `preview` swaps the drawn preview for your own image. |
| `onSelect` | `(file, index) => void` |  | Called when a row in the open list is picked. |
| `onAdd` | `(files) => void` |  | Called with files dropped in from the desktop, or dragged with the application/x-folder-file type. |
| `className` | `string` |  | Classes for the wrapper. |

## Where it fits

- **File managers**: Previews that rise and fan out on hover show what is inside a folder without opening it. Pairs with [File Card](https://uibrik.com/components/file-card.md).
- **Grouped documents**: A folder that flies its files out into a list suits landing pages for document products.
- **Upload targets**: Taking files dropped onto it makes the folder a clear drag-and-drop destination. Pairs with [File Dropzone](https://uibrik.com/components/file-dropzone.md) (Pro).

## Same shelf: Media

- [Merge Gallery](https://uibrik.com/components/merge-gallery.md) (Pro): Six tiles that merge into one video player, and split back apart.
- [Music Player](https://uibrik.com/components/music-player.md) (Pro): Compact player with a sliding cover stack, rolling time and a progress ring.
- [Podcast Chapters](https://uibrik.com/components/podcast-chapters.md): An episode player whose waveform is split into chapters: the played part fills behind the playhead, the line being spoken writes itself in behind a two-colour gradient trail that settles into the text colour, hovering the waveform previews the time and chapter under the pointer, and the playhead drags with a grip that reads out where it will land. The transcript opens into a full list that follows along and seeks on click, bookmarks drop pins on the waveform, and the chapter list lights its stretch of the waveform on hover and fills as it plays; pass a src to drive it from real audio.
- [Aspect Crop](https://uibrik.com/components/aspect-crop.md) (Pro): A photo crop frame that springs between aspect ratios, or resizes freely by its handles in Custom, while the photo stays covered and centred under it, with drag to move, pinch to zoom and rule-of-thirds lines that show only while adjusting.
- [Compare Slider](https://uibrik.com/components/compare-slider.md): A before-and-after frame that sweeps in on first view, with a smooth draggable divider, keyboard support and labels that step aside.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/folder-peek/` so the import paths keep resolving.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
