Black Friday: 30% off Pro

Get 30% off

Updated

File Card

Preview

Q4 planning.pdf

PDF · 2.4 MB
v2

Edited 2h ago by Ava

Customize

Curl46px

Installation

npx shadcn@latest add https://uibrik.com/r/file-card.json
Adds the files to components/uibrik/file-card and installs motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/file-card.

Usage

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={() => {}}/>

Where to use File Card

  • Document managers

    A corner that curls on hover previews the next page without opening the file.

    Pairs with Folder Peek

  • 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.

Props

FileCard
name
Type string
"Q4 planning.pdf"
File name, on the shell.
meta
Type string
"PDF · 2.4 MB"
Muted, beside the name: type and size.
curl
Type number
46
How far the corner curls on hover. Pressing curls it further.
versions
Type { 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
Type () => void
–
Called when the sheet is clicked.
className
Type string
–
Classes for the card.