3D Folder Card, animated React component
A folder card that swings open when you hover, focus or tap it: the front flap falls forward on a spring and up to three papers fan up out of it, each settling with a wobble. Picking a paper grows its cover into a preview dialog you can page through with the arrow keys and close with Escape.
- Free
- Cards
- Hover
- Spring
- 3D
Single folder
Compact grid
Like 3D Folder Card? 256 more are in Pro.
Pro unlocks all 256 Pro components, every template and block, and everything we release next. 3D Folder Card stays free.
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Launch Assets
3 projects
Hover or tap the folder.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| title | string | "Design Archive" | Label under the folder, also printed on the flap. |
| projects | FolderProject[] | 3 sample projects | Each { id, title, image?, bg?, meta?, href? }. The first three show as papers; the preview pages through all of them. Without image, the drawn cover in bg is used. |
| folderBackColor | string | "#3d9cf0" | Back panel colour. |
| folderFrontColor | string | "#6cb8f6" | Front flap colour. |
| folderTabColor | string | — | Tab colour. Defaults to the back colour. |
| size | "sm" | "md" | "md" | "sm" draws the folder at about 60% for dense grids. |
| onOpenProject | (id: string | null) => void | — | Called with the project id when a preview opens, and null when it closes. |
| hint | string | "Hover or tap the folder." | Caption under the count (md only). An empty string hides it. |
| autoplay | boolean | false | Opens and closes the folder by itself until someone touches it. |
| className | string | — | Extra classes for the card. |
Add it to your project
- 1
Set up your project once
You need a Next.js project with Tailwind CSS and the
@/import alias. In its root folder, run this once. It createscomponents.jsonand thecn()helper insrc/lib/utils.ts:npx shadcn@latest init -d
Starting from nothing? The Quick Start walks through the whole thing.
- 2
Connect the registry
Run this once per project. It writes the Nexus UI entry into
components.jsonfor you:npx shadcn@latest registry add "@nexus-labs=https://www.nexus-ui.com/api/registry/{name}"Type it exactly as shown.
{name}is filled in by the CLI with the component you ask for, so you never replace it.
- 3
Add the component
Run this from your project root. It adds the component, the helpers it imports and its npm packages.
npx shadcn@latest add @nexus-labs/three-d-folder
- 4
Check what was added
With a project made as in the Quick Start (a
src/folder), these files land in it:components/three-d-folder/index.tsthree-d-folder.tsx - 5
Copying by hand? Skip the registry
Instead of steps 2 and 3 you can copy the files yourself, with no registry and no API key. Step 1 still applies, so that
cn()exists. Install the packages:npm install framer-motion
Then show the source and create each file at the path it gives:
- 6
Use it in a page
Installing only adds the files. Import the component in a page and render it. The Usage tab on the preview shows a fuller example with props:
// src/app/page.tsx import { ThreeDFolder } from "@/components/three-d-folder"; export default function Page() { return ( <main> <ThreeDFolder /> </main> ); }
Like 3D Folder Card? 256 more are in Pro.
Pro unlocks all 256 Pro components, every template and block, and everything we release next. 3D Folder Card stays free.
About 3D Folder Card
The 3D Folder Card opens and closes on hover, revealing stacked content cards inside. The fold animation uses Framer Motion spring physics combined with CSS perspective transforms to simulate a physical folder opening. Cards inside lift and fan slightly as the folder opens. A distinctive interaction pattern for feature reveals, stacked document displays, or any UI that needs to communicate multiple items contained within a single object.
Good for
- Feature reveal interactions
- Document and file preview displays
- Stacked card and content containers
- Interactive pricing tier comparisons