Work grid lead with facts — Portfolio block

Free

portfolio-work-grid-lead-with-facts · for home, landing pages

Work grid lead with facts

One project told wide with its facts and results, the others as a short list under: a flagship case study; 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-work-grid-lead-with-facts

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import PortfolioWorkGridLeadWithFacts from '@/components/trame/blocks/portfolio/portfolio-work-grid-lead-with-facts.vue'

const props = {
title: "Recent work",
subtitle: "A selection of projects from recent years, with the people who trusted us.",
projects: [
{
title: "Redesigning a linen house’s online shop",
text: "A 300-product 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: "online sales in six months, the 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: {
labels: {
client: "Client",
role: "Role",
year: "Year",
result: "Result"
},
openLabel: "View project"
}
}
</script>

<template>
<PortfolioWorkGridLeadWithFacts 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 · 3 props
PropTypeDescription
openLabelstringWordsthe words of a project’s button ("See the project"); the app’s "See more" when absent
labelsLabelsthe words of the card’s labels, instead of the block’s own
mood'inverse' | 'brand' | 'warm' | 'tint' | stringa band of the page that redefines the theme surfaces inside it
Labels options.labels · 4 props
PropTypeDescription
clientstringWords("Customer")
rolestringWords("Assignment")
yearstringWords("Year")
resultstringWords("Result")
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

  • Project index rows: horizontal cards, picture left and text right, in a single column: projects with real descriptions to read; 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.
  • Project page numbered chapters: the title and facts at the top, the cover, then each part as a numbered row with its picture under it: a piece told as a process, step by step; the merchant’s own only.
  • Project page sticky facts: a column of title, facts, credits and action that stays in view while the cover and the pictures scroll beside it, the sections between them: a piece told mostly in pictures; the merchant’s own only.
  • Work history compact table: one hairline row per position in a table of period, role and place: eight positions or more, scanned like a résumé.
  • Work history skills aside: the positions in a column, the grouped skills and the CV download in a sticky aside: a person or a studio that sells its craft.
  • Work history timeline: a date rail on the left and each position told with its words and points: a path of three to six steps that deserves a story.

All 29 portfolio blocks