Interview classic — Article block

Pro

article-interview-classic · for article, home pages

Interview classic

A printed interview: the person introduced above, questions in bold, answers in a calm column, pull quotes between

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/article-interview-classic

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import ArticleInterviewClassic from '@/components/trame/blocks/article/article-interview-classic.vue'

const props = {
title: "“A good bag gets repaired, not replaced”",
lead: "A conversation with Marion Delcourt, who has run the workshop for ten years, about the craft, patience and what we hold on to.",
person: {
name: "Marion Delcourt",
role: "Leatherworker, Portland workshop",
portrait: "https://images.unsplash.com/photo-1586216583179-20b23ef9dd5f?w=1600&q=80",
alt: "A craftswoman’s hands cutting black fabric, with scissors beside them",
bio: "She has run the workshop for ten years and trains two apprentices every year."
},
exchanges: [
{
question: "How did you get into leatherwork?",
answer: "By chance, as is often the way. I spent one summer restitching the handle of my grandmother’s bag, and after that I didn’t want to do anything else.\n\nI then learned the trade in a small workshop, before opening my own ten years ago.",
pull: "You don’t choose a craft; it chooses you."
},
{
question: "What has changed in the way you work with leather today?",
answer: "We buy less, but better. Every hide is seen, touched and chosen. It takes time, and that’s exactly what our customers come to us for."
}
],
options: {
eyebrow: "Interview",
interviewer: "The editors",
byline: "Interviewed at the workshop in September"
}
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe interview’s title, often a sentence the person said
leadstringWordstwo lines that say who is speaking and why it is worth reading
person*Personthe person interviewed
exchanges*Exchange[]the questions and answers, in order
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Person person · 5 props
PropTypeDescription
name*stringWordsthe person’s name
rolestringWordswhat the person does ("Leatherworker, Lyon workshop")
portraitstringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordswhat the portrait shows, when it is not just the person
biostringWordstwo sentences about the person, as the merchant wrote them
Exchange exchanges[] · 3 props
PropTypeDescription
question*stringWordsthe question asked
answer*stringWordsthe answer; a blank line starts a new paragraph
pullstringWordsa sentence of the answer, set large after it: the person’s own words only
Options options · 4 props
PropTypeDescription
eyebrowstringWordsthe section or series ("Care")
interviewerstringWordswho asks the questions ("The editors")
bylinestringWordscredit line, as the merchant wrote it ("Interview by …")
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
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

A article section, for article, home pages; it uses clsx, motion, tailwind-merge.

More article blocks

  • Author block spotlight: a card with the writer’s portrait and bio beside their best articles: the end of an article, or a journal’s guest of the month.
  • Byline inline: one line under an article’s title: portrait, name, role, date and reading time.
  • End share rail: a sticky vertical rail of share and save links beside the writer, topics and newsletter, the related stories below as rows: a long read people pass on.
  • End stacked: the usual close of a long read: topics, the writer, one newsletter row, then up to three related stories side by side.
  • Layout aside related: a long article whose key facts and next reads should stay in view: the cover wide above a reading column and a sticky aside holding both.
  • Layout deep dive: an article with figures in its flow: wide captioned pictures, fact tables and large pull quotes breaking out of the column.
  • Layout prose: an ordinary article: a centred reading column, the cover wide above it, topics and the next reads below.
  • Layout split header: a feature or a launch story with a portrait or square cover: the cover beside the title, standfirst and byline (and the opening quote, when the article starts on one), the body centred below.

All 29 article blocks