Project index filterable — Portfolio block
Freeportfolio-project-index-filterable · for home, landing pages
Project index filterable
A long list of pieces with a search field and category chips showing their count: more than six, in several kinds; the merchant’s own only
Documentation
Installation
One command copies the block into your project with the shadcn CLI (the registry is set once: Installation).
pnpm dlx shadcn-vue@latest add @trame/portfolio-project-index-filterableUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import PortfolioProjectIndexFilterable from '@/components/trame/blocks/portfolio/portfolio-project-index-filterable.vue'
const props = {
title: "Recent work",
subtitle: "A selection of projects from the past few years, with the clients who trusted us.",
projects: [
{
title: "Redesigning a linen house’s online shop",
text: "A 300-item catalog rebuilt from scratch, clearer product pages and two-click checkout.",
image: "https://images.unsplash.com/photo-1484788984921-03950022c9ef?w=1600&q=80",
alt: "An open laptop with a black screen, next to a coffee",
action: "project",
record: {
id: "maison-de-linge"
},
category: "Online shop",
year: "2025",
client: "Maison Lenoir",
role: "Design and development",
tags: [
"Shop",
"Design"
],
result: {
value: "+38%",
label: "in online sales over six months, client’s figure"
}
},
{
title: "Identity for a neighborhood brewery",
text: "Logo, labels and posters for a craft brewery that wanted a simple face.",
image: "https://images.unsplash.com/photo-1518542698889-ca82262f08d5?w=1600&q=80",
alt: "Brown beer bottles lined up, without labels",
action: "project",
record: {
id: "brasserie"
},
category: "Identity",
year: "2024",
client: "Market Hall Brewery",
role: "Visual identity",
tags: [
"Logo",
"Packaging"
]
}
],
allAction: {
label: "See all projects",
action: "page",
record: {
id: "projets"
}
},
options: {}
}
</script>
<template>
<PortfolioProjectIndexFilterable v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title | string | Wordsthe section’s heading ("Work") |
| subtitle | string | Wordsone line under the heading |
| projects* | Project[] | Datathe pieces of work the owner chose to show, in their order |
| allAction | AllAction | the see-all link: its words and the page action it runs |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Project projects[] · 12 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe project’s name |
| text | string | Wordsone or two sentences on what it is and what was done |
| image | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordsthe picture’s description, when it shows something the title does not say |
| action | string | Actionthe page action that opens the project |
| record | Record<string, unknown> | Datathe record the action opens (the project), if any |
| category | string | Wordsits kind ("Identity", "Online shop") |
| year | string | Wordsits year or period, as written ("2025") |
| client | string | Wordswho it was for |
| role | string | Wordswhat the owner did on it |
| tags | string[] | Wordsshort tags, e.g. the field |
| result | Result | one result of the project, as the owner states it |
Result projects[].result · 2 props
| Prop | Type | Description |
|---|---|---|
| value* | string | Wordsa result as the owner states it, with its unit ("+38%") |
| label* | string | Wordswhat it measures, over which period |
AllAction allAction · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("See all projects") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Options options · 1 props
| Prop | Type | Description |
|---|---|---|
| mood | 'inverse' | 'brand' | 'warm' | 'tint' | string | a band of the page that redefines the theme surfaces inside it |
What it asks your app for
The block never knows your app: it asks it, through one context provided once, where its links lead, what its actions do, how a price reads and which words to say (The host context).
| Member | What it is for |
|---|---|
| href | the address an action leads to, or null to hide what leads there |
| act | runs a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error } |
| can | whether the page has this action |
| asset | a picture’s address as your app serves it |
| Link | your router’s link component |
| cartCount | the cart badge’s number |
| cartDrawer | whether your app has a cart drawer |
| cartOpen | whether the cart drawer is open |
| label | your word for an interface key, or undefined to keep the block’s own |
The words it says itself, in English and French; label(key) replaces any of them:
| Key | English | French |
|---|---|---|
| newsletter.already | You are already subscribed. | Vous êtes déjà inscrit. |
| newsletter.done | Done: you are subscribed. | C’est noté : vous êtes inscrit. |
| newsletter.invalid | Check the email address. | Vérifiez l’adresse e-mail. |
| newsletter.tooMany | Too many attempts, try again in a moment. | Trop de tentatives, réessayez dans un moment. |
Features
- Every word in the server HTML
- Same markup in Vue and React
- Theme tokens only: every theme, light and dark
- Shows what you give it, invents nothing
- Expressive motion, within its budget; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
projects[],allAction - Reads
projectsfrom your app
A portfolio section, for home, landing pages; it uses @lucide/vue, @vueuse/core, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.
Built with
The components this block is made of; each one installs on its own too.
More portfolio blocks
- Decision log rounds timeline: Iterations along a dated rail, with images when available; the merchant’s own only.
- Decision log: References, dates and statuses in a compact decision register; the merchant’s own only.
- Exhibitions grid: every status under its own heading with picture cards, the headings in a margin column: a venue with several shows at once to compare.
- Exhibitions poster: what is on shown as a large poster with its text, what comes next as dated rows, the past in a quiet list: a venue with one headline show at a time.
- Exhibitions season: a sideways rail of tall posters ordered from now to the past with a line marking each status: a season to browse from left to right.
- Postmortem event log: Incident sections beside a timestamped event log; the merchant’s own only.
- Project page cover overlay: the cover full-bleed with the title over its foot, then the first part beside a small list of facts: a piece with one strong image; the merchant’s own only.
- Project page cover then facts: the title very large, the facts in a ruled row, the cover wide, then the sections and the pictures in alternating widths: the usual page of one piece of work (a building, a shoot, an identity, an object); the merchant’s own only.