Case study comes with Pro. Its preview shows once you unlock it.
Usage
import { PortfolioCase } from './PortfolioCase.jsx'
<PortfolioCase
locale="en"
study={study} // { title, summary, client, year, role, tags, problem, steps, outcomes, before, after, next }
loading={!study}
error={loadError}
onRetry={reload}
onNext={(next) => router.push('/work/' + next.slug)}
/>Props
| Prop | Type | Default | What it does |
|---|---|---|---|
locale | 'en' | 'zh-CN' | 'es' | 'ja' | 'en' | Language of the built-in text and the sample case. |
study | { title, summary, client, year, role, tags, problem, steps: [{ title, text }], outcomes: [{ value, label }], before, after, next: { title, kind } } | null | sample case | The case. Each part is optional and its section is left out without it; null shows the empty state. |
onNext | (next) => void | — | The next project card was pressed. |
renderPicture | (which: 'hero' | 'before' | 'after', study) => ReactNode | — | Shows your own pictures (screenshots, say) instead of the drawn screens. |
loading / error / onRetry | boolean / boolean | string / () => void | false | A skeleton while loading; an error banner with a retry button (a string replaces its sentence). |
labels | object | — | Replaces any built-in text (keys as in copy.js). |
className | string | — | Added to the root element. |
Add it to your project
Pro includes the full source of this block. Copy its prompt to install it with your coding agent.
PortfolioCase.jsxportfolio-case.csscopy.jskit.jsxkit.cssui/base-button/ui/empty-state/ui/alert-banner/ui/scroll-reveal/ui/skeleton-shimmer/ui/segmented-control/tokens.cssREADME.md
The block, its stylesheet and text, the shared kit, the components it uses and tokens.css install together into one folder.
