# File Card

> A document card whose corner curls on hover to show the next page, with older versions stacked behind the sheet.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Blocks › Cards |
| Live preview | https://uibrik.com/components/file-card |
| Writes | 1 file into `components/uibrik/file-card/` |
| Packages | `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/file-card.json
```

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

Can't run commands? https://uibrik.com/components/file-card/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 { FileCard } from "@/components/uibrik/file-card/file-card";

const versions = [
  { author: "Maya", time: "Mon" },
  { author: "Ava", time: "2h ago" },
];

<FileCard
  name="Q4 planning.pdf"
  meta="PDF · 2.4 MB"
  curl={46}
  versions={versions}
  onOpen={() => {}}
/>
```

## Tune it

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

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `name` | `string` | `"Q4 planning.pdf"` | File name, on the shell. |
| `meta` | `string` | `"PDF · 2.4 MB"` | Muted, beside the name: type and size. |
| `curl` | `number` | `46` | How far the corner curls on hover. Pressing curls it further. |

## Wire it

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

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `versions` | `{ author?: string; time?: string; preview?: string }[]` | `2 sample versions` | Versions on mount, oldest first. The last is on top; preview swaps the drawn page for an image. |
| `onOpen` | `() => void` |  | Called when the sheet is clicked. |
| `className` | `string` |  | Classes for the card. |

## Where it fits

- **Document managers**: A corner that curls on hover previews the next page without opening the file. Pairs with [Folder Peek](https://uibrik.com/components/folder-peek.md).
- **Version history**: Older versions stacked behind the sheet show a document has history at a glance.
- **Reports and contracts**: A realistic sheet makes an invoice or report feel like a real document on a landing page.

## Same shelf: Cards

- [Flag Rollout](https://uibrik.com/components/flag-rollout.md) (Pro): A feature flag rolling out to production. A grid of dots stands for the users: each step lights more of them in a wave, and exposed users who hit an error flash red. Error rate and p95 latency run as live sparklines, the error chart with its guardrail. Play steps the flag up on its own; if errors stay over the guardrail it rolls itself back and the grid drains in reverse. Pick any stage by hand, and every change lands in the log.
- [Flight Tracker](https://uibrik.com/components/flight-tracker.md) (Pro): A flight in one wide card. On the left, a dotted 3D globe with a faint graticule and the great-circle route lifted off the surface: the flown part trails in behind the plane, which flies over its own shadow while the camera turns with it. Drag the globe to look around and it eases back to the plane. Altitude, speed, distance and time to landing sit live on the globe, with play, pause and 1×, 4× and 16× speed; the destination pulses on approach and rings on touchdown. On the right, both airports with a progress line, aircraft, seat, bags and the weather on arrival, a scrubbable altitude profile that rings that point on the globe, and a timeline that lights up event by event. Stacks on narrow screens.
- [Integration Box](https://uibrik.com/components/integration-box.md) (Pro): An open box in a card with your integrations falling into it on a steady loop: each logo glides down from above, eases through the opening and sinks out of sight, then comes round again.
- [Live Cursors](https://uibrik.com/components/live-cursors.md) (Pro): A shared document where three teammates' cursors select, type and drag a card at their own pace, to show real-time collaboration.
- [Magnify Card](https://uibrik.com/components/magnify-card.md) (Pro): A page of tiny text and a magnifying lens that drifts from match to match: under the glass the words are real and readable, and each match it passes is highlighted.
- [Package Tracker](https://uibrik.com/components/package-tracker.md): A parcel on its way, in one wide card. On the left, an isometric city with buildings, parks, traffic and drifting cloud shadows; the route is traced along the streets, numbered pins drop in as each stop is reached and a van drives from one to the next. At the door the van hands the parcel over, the house lights up and the card turns green, and on autoplay the run starts over. On the right, the delivery window narrows as stops go by and counts the drops before yours on the last street, with the driver (call and message), the parcel's details and tracking steps that tick off as the van arrives. Stacks on narrow screens.

## Ground rules

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