Interview margin names — Article block
Proarticle-interview-margin-names · for article, home pages
Interview margin names
Speakers named in a margin column, the text beside them: a long interview read like a transcript
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-margin-namesUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import ArticleInterviewMarginNames from '@/components/trame/blocks/article/article-interview-margin-names.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>
<ArticleInterviewMarginNames v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe interview’s title, often a sentence the person said |
| lead | string | Wordstwo lines that say who is speaking and why it is worth reading |
| person* | Person | the person interviewed |
| exchanges* | Exchange[] | the questions and answers, in order |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Person person · 5 props
| Prop | Type | Description |
|---|---|---|
| name* | string | Wordsthe person’s name |
| role | string | Wordswhat the person does ("Leatherworker, Lyon workshop") |
| portrait | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordswhat the portrait shows, when it is not just the person |
| bio | string | Wordstwo sentences about the person, as the merchant wrote them |
Exchange exchanges[] · 3 props
| Prop | Type | Description |
|---|---|---|
| question* | string | Wordsthe question asked |
| answer* | string | Wordsthe answer; a blank line starts a new paragraph |
| pull | string | Wordsa sentence of the answer, set large after it: the person’s own words only |
Options options · 4 props
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsthe section or series ("Care") |
| interviewer | string | Wordswho asks the questions ("The editors") |
| byline | string | Wordscredit line, as the merchant wrote it ("Interview by …") |
| mood | 'inverse' | 'brand' | 'warm' | 'tint' | string | a 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).
| Member | What it is for |
|---|---|
| href | the address an action leads to, or null to hide what leads there |
| act | runs a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error } |
| can | whether the page has this action |
| asset | a picture’s address as your app serves it |
| cartCount | the cart badge’s number |
| cartDrawer | whether your app has a cart drawer |
| cartOpen | whether the cart drawer is open |
| label | your 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:
| Key | English | French |
|---|---|---|
| newsletter.already | You are already subscribed. | Vous êtes déjà inscrit. |
| newsletter.done | Done: you are subscribed. | C’est noté : vous êtes inscrit. |
| newsletter.invalid | Check the email address. | Vérifiez l’adresse e-mail. |
| newsletter.tooMany | Too 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
- 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.
- Layout steps: a how-to: a strip of key facts, then numbered steps each with its picture.