Portfolio
ProNewA portfolio with a profile header, category filters and project cards in grid, tiles, list or masonry that open a detail popup with gallery, description and facts.
Installation
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
Props
<Portfolio>
| Prop | Type | Default |
|---|---|---|
| projects* | PortfolioProject[] | — |
| layout | "grid" | "tiles" | "list" | "masonry"Cards with a gap, edge-to-edge square tiles, one large project per row, or masonry columns at natural image ratio. | "grid" |
| columns | 2 | 3 | 4Most columns to use when there is room. | 3 |
| owner | PortfolioOwnerWho the work belongs to. Renders the header above the filters. | — |
| cta | { label: string; href?: string; onClick?: () => void }The call to action in the header and in the popup bar. | — |
| filters | booleanShow category filter chips. | true |
| allLabel | stringLabel of the chip that shows every project. | "All" |
| info | "hover" | "below" | "none"Where the title and category sit: over the cover on hover, under the cover, or nowhere. The list layout always shows them below. | "hover" |
| action | "popup" | "none"What a click does: open the detail popup or nothing. | "popup" |
| loading | booleanShows placeholder cards while projects are being fetched. | false |
| emptyText | stringMessage when there is nothing to show. | "No projects yet" |
| onProjectOpen | (project: PortfolioProject) => voidCalled with the project whenever its popup opens. | — |
| className | string | — |
<ProjectPopup>
| Prop | Type | Default |
|---|---|---|
| projects* | PortfolioProject[] | — |
| openId* | string | null | — |
| owner | PortfolioOwner | — |
| cta | PortfolioProps["cta"] | — |
| onOpen* | (id: string | null) => void | — |
Accessibility
- Filters are toggle buttons; the number of matching projects is announced after each change.
- Every card is one button named with the project and its category.
- The popup is a dialog that traps focus and returns it to the card. Left and Right move between projects, Escape closes, and panel and backdrop enter together.
- Unsafe owner, social, fact or CTA links never become active links; contact schemes such as mailto stay linked.
- Cards re-flow without scaling or sliding under reduced motion.