---
title: "Glass Folder"
description: "A folder you can see into: up to three files peek out of a frosted glass pocket, lift on hover, and a file you drop falls in."
url: https://gelatinui.com/components/glass-folder
markdown_url: https://gelatinui.com/components/glass-folder.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/glass-folder"
version: "2026-11-16"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Glass Folder

> A folder you can see into: up to three files peek out of a frosted glass pocket, lift on hover, and a file you drop falls in.

Page: https://gelatinui.com/components/glass-folder

## When to use it

Best for: A grid of folders that shows a peek of the files inside and takes files people drop on it.

- Use it in a drive, a gallery, or a project page where people open folders from a grid.
- Set `onFilesDrop` to make the folder a drop target; set `acceptsDrop` to refuse some types.
- Use `GlassFolderProgress` for an upload, and `GlassFolderBadge` for a locked folder or a failed upload.

## When not to use it

- For a list row with a file name, a size, and actions, use an [Attachment](https://gelatinui.com/components/attachment.md).
- For a drop area for files with no folder, use a [Dropzone](https://gelatinui.com/components/dropzone.md).

## Notes for agents

- Compose it: `GlassFolderVisual` holds `GlassFolderFiles`, `GlassFolderFront`, and `GlassFolderCheck`; `GlassFolderCaption` holds `GlassFolderLabel` and `GlassFolderMeta`; put `GlassFolderOpen` last.
- `GlassFolderFile` takes `index` 0, 1, or 2 (back start, middle, front end). Give each file a `key` so a new one falls in.
- `GlassFolderOpen` is a Base UI Button over the whole tile, named by the label and described by the meta. For a link, pass `render={<a href="…" />}` and `nativeButton={false}`.
- With no children, the root renders the Visual alone. `selected` shows the outline and the check; it does not select on press.
- `dropState` shows `over` or `rejected` when the app owns the drag; with no `dropState`, the folder tracks its own drag while `onFilesDrop` is set.

## Anatomy

```text
GlassFolder
├─ GlassFolderVisual (0..n)
├─ GlassFolderFiles (0..n)
├─ GlassFolderFile (0..n)
├─ GlassFolderFront (0..n)
├─ GlassFolderEmpty (0..n)
├─ GlassFolderBadge (0..n)
├─ GlassFolderProgress (0..n)
├─ GlassFolderCheck (0..n)
├─ GlassFolderCaption (0..n)
├─ GlassFolderLabel (0..n)
├─ GlassFolderMeta (0..n)
└─ GlassFolderOpen (0..n)
```

## API reference

### GlassFolder

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `size` | `"default" \| "lg" \| "sm"` |  |  |
| `tint` | `"chart-1" \| "chart-2" \| "chart-3" \| "chart-4" \| "chart-5" \| "neutral"` |  |  |
| `selected` | `boolean` | false | Shows the folder as picked: an outline with a gap and the `GlassFolderCheck`. |
| `disabled` | `boolean` | false | Stops the open press, the hover pose, and drops. |
| `dropState` | `"over" \| "rejected"` |  | The drop to show, when the app owns the drag (a Dropzone around a grid). With none, the folder tracks its own drag while `onFilesDrop` is set. |
| `onFilesDrop` | `function` |  | Makes the folder a drop target: called with the files of a drop that `acceptsDrop` took. |
| `acceptsDrop` | `function` |  | Tells whether a drag can drop here, from the MIME types the browser shows during a drag (names are hidden until the drop). Default: every file. |

### GlassFolderVisual

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### GlassFolderFiles

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### GlassFolderFile

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `index` | `0 \| 1 \| 2` |  | The place in the fan: `0` back at the start, `1` the middle, `2` front at the end. |

### GlassFolderFront

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### GlassFolderEmpty

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### GlassFolderBadge

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `tone` | `"destructive" \| "neutral"` |  |  |

### GlassFolderProgress

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |
| `glow` | `boolean` |  | A soft halo in the fill color (`glow`, `@gelatin-ui/glow`). Default: `false`. |
| `tone` | `TrackTone` |  | The fill color: `default` (`primary`), or a status for a task whose state has a meaning: `success` done, `warning` slow or nearly full, `info` a neutral step, `destructive` failed. Color is never the only signal: say the state in the label or value. |

Also takes every prop of Base UI `Progress.Root`: https://base-ui.com/react/components/progress

### GlassFolderCheck

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### GlassFolderCaption

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### GlassFolderLabel

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### GlassFolderMeta

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### GlassFolderOpen

Also takes every prop of Base UI `Button`: https://base-ui.com/react/components/button

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| GlassFolder | `glass-folder` | `data-disabled`, `data-drop` | `--background`, `--chart-1`, `--chart-2`, `--chart-3`, `--chart-4`, `--chart-5`, `--destructive`, `--glass-folder-back`, `--glass-folder-back-end`, `--info` |  |
| GlassFolderVisual | `glass-folder-visual` | `data-outline` | `--glass-folder-back`, `--glass-folder-back-end` |  |
| GlassFolderFiles | `glass-folder-files` |  |  |  |
| GlassFolderFile | `glass-folder-file` |  |  |  |
| GlassFolderFront | `glass-folder-front` | `data-drop` |  | `status-colors` |
| GlassFolderEmpty | `glass-folder-empty` |  |  |  |
| GlassFolderBadge | `glass-folder-badge` |  |  | `status-colors` |
| GlassFolderProgress | `glass-folder-progress` |  |  |  |
| GlassFolderCheck | `glass-folder-check` |  |  |  |
| GlassFolderCaption | `glass-folder-caption` |  |  |  |
| GlassFolderLabel | `glass-folder-label` |  |  |  |
| GlassFolderMeta | `glass-folder-meta` |  |  |  |
| GlassFolderOpen | `glass-folder-open` | `data-disabled` |  |  |

## Usage

Compose the folder from its parts: the files behind the glass, the caption, and the open press last, over the whole tile.

The sample also uses `image`, which this add does not write. One command adds them with this item:

```bash
npx shadcn@latest add @gelatin-ui-pro/glass-folder @gelatin-ui/image
```

```tsx title="trip-folder.tsx"
import {
  GlassFolder,
  GlassFolderCaption,
  GlassFolderFile,
  GlassFolderFiles,
  GlassFolderFront,
  GlassFolderLabel,
  GlassFolderMeta,
  GlassFolderOpen,
  GlassFolderVisual,
} from "@/components/pro/files/glass-folder";
import { Image } from "@/components/ui/image";

export function TripFolder({ onOpen }: { onOpen: () => void }) {
  return (
    <GlassFolder tint="chart-2">
      <GlassFolderVisual>
        <GlassFolderFiles>
          <GlassFolderFile key="cabin" index={0}>
            <Image src="/photos/cabin.webp" alt="" fill />
          </GlassFolderFile>
          <GlassFolderFile key="pines" index={2}>
            <Image src="/photos/pines.webp" alt="" fill />
          </GlassFolderFile>
        </GlassFolderFiles>
        <GlassFolderFront />
      </GlassFolderVisual>
      <GlassFolderCaption>
        <GlassFolderLabel>Summer trip</GlassFolderLabel>
        <GlassFolderMeta>24 photos · 1.2 GB</GlassFolderMeta>
      </GlassFolderCaption>
      <GlassFolderOpen onClick={onOpen} />
    </GlassFolder>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui-pro/glass-folder
```

It adds 29 registry items: 25 files, 4710 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [Progress](https://gelatinui.com/components/progress.md)

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Progress](https://gelatinui.com/components/progress.md)
- [Image](https://gelatinui.com/components/image.md)
- [File Icon](https://gelatinui.com/components/file-icon.md)
- [Dropzone](https://gelatinui.com/components/dropzone.md)

## Keyboard

| Keys | Action |
| --- | --- |
| Tab | Moves the focus to the open press of the folder and shows the outline. |
| Enter | Opens the folder (calls the `onClick` of `GlassFolderOpen`). |
| Space | Opens the folder (calls the `onClick` of `GlassFolderOpen`). |

## Accessibility

`GlassFolderOpen` is a Base UI Button over the whole tile: `aria-labelledby` points at `GlassFolderLabel` and `aria-describedby` at `GlassFolderMeta`. A plain-text name is also its `title`, so a cut name shows in full.

The folder picture is decoration (`aria-hidden`); the label and the meta say what is in it. Say a lock or a failed upload in the meta too: the badge is not the only signal.

Keyboard focus shows a 2px outline 3px off the picture, with corners that follow it. Selection shows the same outline and a check.

The open press covers the folder and its caption, so the touch target is the full tile.

## Motion

| Part | Motion |
| --- | --- |
| Hover and press | island · the files lift and turn out of the pocket (the middle one first, the outer ones 30ms later) and the glass tips back 18° |
| Press | press · 100ms · ease-out (0, 0, 0.2, 1) · the folder scales to 97% from its bottom edge |
| Drag over | hover · 150ms · ease-out (0, 0, 0.2, 1) · the files lift higher and the glass tips back 30° |
| A file drops in | island · the new file falls in from above and settles; an old one slides down under the glass and fades out on fade-exit |
| Selected check | statusPop · the check pops in from 60% scale and fades out on fade-exit |
| Meta text | fade · 150ms · the new text rises in place while the old one leaves on fade-exit (90ms) |
