Project index filterable — Portfolio block

Free

portfolio-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-filterable

Usage

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.

PropTypeDescription
titlestringWordsthe section’s heading ("Work")
subtitlestringWordsone line under the heading
projects*Project[]Datathe pieces of work the owner chose to show, in their order
allActionAllActionthe see-all link: its words and the page action it runs
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Project projects[] · 12 props
PropTypeDescription
title*stringWordsthe project’s name
textstringWordsone or two sentences on what it is and what was done
imagestringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordsthe picture’s description, when it shows something the title does not say
actionstringActionthe page action that opens the project
recordRecord<string, unknown>Datathe record the action opens (the project), if any
categorystringWordsits kind ("Identity", "Online shop")
yearstringWordsits year or period, as written ("2025")
clientstringWordswho it was for
rolestringWordswhat the owner did on it
tagsstring[]Wordsshort tags, e.g. the field
resultResultone result of the project, as the owner states it
Result projects[].result · 2 props
PropTypeDescription
value*stringWordsa result as the owner states it, with its unit ("+38%")
label*stringWordswhat it measures, over which period
AllAction allAction · 3 props
PropTypeDescription
label*stringWordswhat happens ("See all projects")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
Options options · 1 props
PropTypeDescription
mood'inverse' | 'brand' | 'warm' | 'tint' | stringa 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).

MemberWhat it is for
hrefthe address an action leads to, or null to hide what leads there
actruns a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error }
canwhether the page has this action
asseta picture’s address as your app serves it
Linkyour router’s link component
cartCountthe cart badge’s number
cartDrawerwhether your app has a cart drawer
cartOpenwhether the cart drawer is open
labelyour 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:

KeyEnglishFrench
newsletter.alreadyYou are already subscribed.Vous êtes déjà inscrit.
newsletter.doneDone: you are subscribed.C’est noté : vous êtes inscrit.
newsletter.invalidCheck the email address.Vérifiez l’adresse e-mail.
newsletter.tooManyToo 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 projects from 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.

All 29 portfolio blocks