Three columns — Case studies block

Free

case-studies-three-columns · for home, landing, portfolio pages

Three columns

One story told in three steps: the challenge, what was done, the results

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/case-studies-three-columns

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import CaseStudiesThreeColumns from '@/components/trame/blocks/case-studies/case-studies-three-columns.vue'

const props = {
heading: "They did it with us",
lead: "Stories told with our customers’ consent, and their numbers.",
stories: [
{
customer: "Maison des Champs",
headline: "A neighborhood grocer that doubled its bulk aisle in a year",
summary: "After a three-month trial with our deposit containers, the grocer rebuilt its aisle around bulk and kept the same team.",
challenge: "The bulk aisle took up six feet of shelving and produced a lot of waste because of unsuitable containers.",
solution: "Deposit containers, a weekly restock and new signage designed with the store team.",
outcome: "The aisle now runs twenty feet and keeps itself stocked between deliveries.",
results: [
{
value: "×2",
label: "more bulk products on offer",
note: "from 40 to 80 products, between January and December 2025"
},
{
value: "−35%",
label: "less waste in the aisle",
note: "measured by the grocer over twelve months"
}
],
quote: "We stopped throwing products away, and our customers come back with their jars without us having to ask.",
author: "Claire, manager",
image: "https://images.unsplash.com/photo-1542838132-92c53300491e?w=1600&q=80",
alt: "The fresh fruit and vegetable aisle of a store",
href: "case",
record: {
id: "maison-des-champs"
},
tags: [
"Grocery",
"Bulk"
],
before: [
"Six feet of bulk, often out of stock",
"Containers thrown away after a single use"
],
after: [
"Twenty feet of bulk, restocked every week",
"Deposit containers, reused"
],
goals: [
{
goal: "Double the bulk products",
target: "80 products",
outcome: "80 products",
status: "met"
},
{
goal: "Cut waste in half",
target: "−50%",
outcome: "−35%",
status: "partial"
}
],
note: "Figures provided by the grocer, for January 1 to December 31, 2025."
},
{
customer: "Quay Bookshop",
headline: "A reading nook that keeps visitors twenty minutes longer",
results: [
{
value: "+20 min",
label: "more time spent in store"
},
{
value: "12",
label: "events hosted in 2025"
}
],
href: "case",
tags: [
"Bookshop"
],
image: "https://images.unsplash.com/photo-1700308234428-c619d7408fbd?w=1600&q=80"
}
]
}
</script>

<template>
<CaseStudiesThreeColumns v-bind="props" />
</template>

Props

Each prop says who changes it: Words, Picture, Action, Design, Data.* required.

PropTypeDescription
headingstringWordsthe section’s title ("They did it with us")
leadstringWordsone sentence of context
stories*Story[]the customer stories, each with its results
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Story stories[] · 19 props
PropTypeDescription
customer*stringWordsthe customer’s name, with their agreement
logostringPicturethe customer’s logo, as they gave it
headline*stringWordsthe story in one sentence
summarystringWordstwo or three sentences of what happened
challengestringWordsthree-columns: the situation before
solutionstringWordsthree-columns: what was done
outcomestringWordsthree-columns: the result in words, next to the figures
results*Result[]the story’s measured results
quotestringWordsthe customer’s words, exactly, with their consent
authorstringWordswho said it ("Claire, head of purchasing")
imagestringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordsthe picture’s description, when it shows something the words do not
hrefstringActionthe full story
recordRecord<string, unknown>Datathe record the action opens (an article), if any
tagsstring[]Wordsup to four short tags, e.g. the sector
beforestring[]Wordsbefore-after: what was wrong, one line each
afterstring[]Wordsbefore-after: what is now, one line each
goalsGoal[]goals-table: target against outcome
notestringWordsperiod and method of the figures, under the story
Result stories[].results[] · 3 props
PropTypeDescription
value*stringWordsthe customer’s own figure, as they gave it ("−32%", "12 → 30 stockists")
label*stringWordswhat it measures, with its period ("fewer returns over six months")
notestringWordshow it was measured, if the customer said
Goal stories[].goals[] · 4 props
PropTypeDescription
goal*stringWordswhat was aimed at
targetstringWordsthe target, as set
outcome*stringWordswhat was reached, exactly
status*'met' | 'partial' | 'missed'the merchant states it, a miss included
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
  • Subtle motion: one short reveal; still under reduced motion
  • Real buttons and links, a visible focus
  • Asks your app through actions: stories[].href

A case studies section, for home, landing, portfolio 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 case studies blocks

  • Study cards figure split: two to twelve stories as wide split cards in a rail, the customer and their first figure huge on one half and the cover on the other, the next card peeking: when one number per customer is the pitch and the covers are good (the customer’s own figures only).
  • Study cards grid previews: two to twelve stories as cards with a cover, a tag and two results: when there are several customers to show, not one to tell.
  • Study cards overlay mosaic: four to six stories as a bento of covers, the first one tall, the text over each cover: a more editorial proof section.
  • Study cards overlay rail: three to ten stories with strong covers as tall cards in a swipe rail, the headline and first result over the cover: a marketing page with good pictures.
  • Study page facts strip: a customer story told in one calm column under a wide cover and a strip of facts: the usual story, with a quote or two.
  • Study page stats between: the sections broken by full-width bands of the customer’s figures and quotes: a story led by its results.
  • Study page with aside: the story in a reading column beside a sticky card of facts, figures and the action: a longer, more technical story.
  • Video case lead: the customer’s film opens the page (a poster, played only on a click), its transcript under it: a customer who filmed.

All 20 case studies blocks