A portfolio or project list as a real card file. Click the drawer and it slides open, click a card and it lifts out along one smooth arc to show its image, click again and it files back in its place. Each card can link to its page. It's plain CSS 3D, with soft shadows computed so they stay sharp on every phone.
npx shadcn@latest add @clickworks-pro/card-drawerNeeds your Pro token, set up once in Pro access.
"use client"
import { CardDrawer } from "@/components/clickworks/card-drawer/react/CardDrawer"
export function Work() {
return (
<div style={{ width: 480, height: 600 }}>
<CardDrawer
name="Your Name"
cards={[
{ title: "Brand", image: { src: "/work/brand.jpg", alt: "Brand system" }, link: "/work/brand" },
{ title: "App", image: { src: "/work/app.jpg", alt: "Banking app" }, link: "/work/app" },
]}
/>
</div>
)
}Up to six cards. Each has a title on its tab, an image and an optional link.
Engraved on the drawer front. Leave empty for none.
Default "Ada Voss"
How it looks on load: closed, open, or open with the first card lifted.
Default "closed"
Auto follows the page (its background, data-theme or dark class), then the device.
Default "auto"
Colours for each theme. Every face and shadow is shaded from them.
The camera: how far you look down on the drawer and how far it's turned.
Default 30, 22
Card corners, board thickness, image border, tab numbers and rivets.
Strength of the floor, card and held-card shadows.
Default 1, 1, 1
Seconds for a card to lift out.
Default 1.35
Open card links in a new tab.
Default false
Soft paper sounds and a light tap on phones.
Default true
The drawer opened.
The drawer closed.
A card was lifted out.
A lifted card was clicked.
It fills its box and keeps a 580 by 720 shape. Colours come in through the light and dark props, and the tab and name fonts through labelFont and nameFont.