Study page facts strip — Case studies block

Pro

case-studies-study-page-facts-strip · for case-study, landing pages

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

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-study-page-facts-strip

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import CaseStudiesStudyPageFactsStrip from '@/components/trame/blocks/case-studies/case-studies-study-page-facts-strip.vue'

const props = {
title: "A joinery workshop sells online without leaving its workbench",
deck: "In six weeks, the workshop went from a paper order book to a shop that takes measurements, lead times and deposits on its own.",
cover: "https://images.unsplash.com/photo-1597960194599-22929afc25b1?w=1600&q=80",
facts: [
{
label: "Customer",
value: "Light Oak Workshop"
},
{
label: "Location",
value: "Portland, Oregon"
}
],
sections: [
{
heading: "The need",
body: "Every table was drawn, quoted and followed up by phone. Requests came in by message, by mail and sometimes on the corner of a drawing, and the manager spent her evenings copying it all out.\n\nThe workshop wanted to keep its way of working: offer sizes, wood species and finishes, without turning every order into an appointment."
},
{
heading: "The setup",
body: "The shop was built around the quote: the customer picks the wood, the length and the finish, and watches the price and lead time update. A deposit is taken with the order, the balance on delivery.\n\nThe workshop photos were taken on site, on a Saturday, with whatever was already in use for that week’s orders."
}
],
quotes: [
{
text: "I don’t copy anything out anymore. Orders arrive with everything we need to cut the first tabletop.",
person: "Claire Marchand",
role: "workshop manager"
},
{
text: "Our customers finally understand why a lead time is a lead time.",
person: "Julien Vasseur",
role: "shop foreman"
}
],
figures: [
{
value: "6 weeks",
label: "from the first meeting to the first order"
},
{
value: "3 evenings",
label: "a week given back to the manager"
}
],
previous: {
id: "torrefaction",
title: "A coffee roaster that ships the same day",
customer: "Market Hall Roasters",
image: "https://images.unsplash.com/photo-1447933601403-0c6688de566e?w=1600&q=80",
alt: "Roasted coffee beans"
},
next: {
id: "poterie",
title: "A pottery that opens its studios to the public",
customer: "Riverbank Pottery",
image: "https://images.unsplash.com/photo-1676125105332-608345abe20e?w=1600&q=80",
alt: "A potter’s wheel surrounded by tools"
},
open: "case-study",
cta: {
label: "Talk about your project",
action: "contact"
},
options: {
eyebrow: "Customer story",
alt: "The joinery workshop, its workbenches and the light from the big window",
ctaTitle: "A story close to yours?"
}
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe story’s title: the result or the customer, in a sentence
deckstringWordsone or two sentences under the title: the situation and the outcome
coverstringPicturethe customer in context: a place, a product in use
factsFact[]Datathe customer’s facts, in the order to read them: leave out what the merchant does not know
sections*Section[]Datathe story, part by part, in reading order
quotesQuote[]Datathe customer’s own quotes: each is set between the sections
figuresFigure[]Datathe customer’s own results: a figure the customer did not give is not shown
previousPreviousDatathe story before this one
nextNextDatathe story after this one
openstringActionthe action that opens another story; the story is its record
ctaCtathe call to action: its words and the page action it runs
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Fact facts[] · 2 props
PropTypeDescription
label*stringWordswhat the fact is ("Customer", "Place", "Team", "Product used")
value*stringWordsthe fact, as the customer or the merchant states it
Section sections[] · 2 props
PropTypeDescription
heading*stringWordsthe section’s heading ("The need", "The setup")
body*stringWordsthe story of this part; a blank line starts a new paragraph
Quote quotes[] · 3 props
PropTypeDescription
text*stringWordswhat the customer said, word for word: only a quote the customer gave and agreed to
person*stringWordswho said it
rolestringWordstheir role and company, as they give it
Figure figures[] · 2 props
PropTypeDescription
value*stringWordsthe figure as the customer states it ("3 weeks", "40%")
label*stringWordswhat it measures
Previous previous · 5 props
PropTypeDescription
id*string | numberDatathe story’s id in the tool that answers it
title*stringWordsthe other story’s title
customerstringWordsits customer
imagestringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordswhat the picture shows
Next next · 5 props
PropTypeDescription
id*string | numberDatathe story’s id in the tool that answers it
title*stringWordsthe other story’s title
customerstringWordsits customer
imagestringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordswhat the picture shows
Cta cta · 3 props
PropTypeDescription
label*stringWordswhat happens ("Talk to the team")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action applies to, passed to the host with it, if any
Options options · 4 props
PropTypeDescription
eyebrowstringWordswhat kind of story it is ("Customer story")
altstringWordsthe cover’s description
ctaTitlestringWordsthe words over the action ("A story close to yours?")
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: open, cta

A case studies section, for case-study, landing pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.

More case studies blocks

  • Study cards feature rows: two to four deep stories as wide alternating rows, the cover beside the headline and all the results as a strip of figures: a few customers told at length.
  • Study cards figure cover: cards whose cover carries the customer’s first figure very large, the headline and a second result under it: when the results are the pitch (the customer’s own figures only).
  • 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.
  • Three columns: one story told in three steps: the challenge, what was done, the results.
  • 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