Author block spotlight — Article block

Pro

article-author-block-spotlight · for article, journal pages

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

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-author-block-spotlight

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import ArticleAuthorBlockSpotlight from '@/components/trame/blocks/article/article-author-block-spotlight.vue'

const props = {
title: "Written by",
authors: [
{
id: "camille",
name: "Camille Roussel",
role: "Writer, materials and care",
avatar: "https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=1600&q=80",
bio: "She has written about materials since the first collection and spends her weeks between the workshop and the tannery.",
articleCount: 14,
links: [
{
label: "Her notebook",
url: "https://example.com/camille"
}
]
}
],
topArticles: [
{
id: "a1",
title: "How we choose our leathers, and why we turn half of them down",
section: "Materials",
author: {
name: "Camille Roussel"
},
date: "2026-10-02",
readingTime: "7 min"
},
{
id: "a2",
title: "Caring for a waxed canvas bag: a five-step guide",
section: "Care",
author: {
name: "Camille Roussel"
},
date: "2026-09-24",
readingTime: "4 min"
}
]
}
</script>

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

Props

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

PropTypeDescription
titlestringWordsthe block’s title ("Written by", "The journal’s writers"), if it needs one
authors*Author[]Datathe writers: one for an article, several for the journal
topArticlesTopArticle[]Datathe articles of these writers to put forward, as the shop chose or ranked them
openstringActionthe action that opens one article; the article is its record
openAuthorstringActionthe action that opens a writer’s page; the writer is its record
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Author authors[] · 9 props
PropTypeDescription
idstring | numberDatathe record’s id in the tool that answers it
name*stringWordsthe person’s name
rolestringWordstheir role or job title
companystringWordswhere they work
avatarstringPicturea picture: a root-relative path (/media/…) or an absolute URL
urlstringDesigna page about them
biostringWordswho they are, in the words the merchant or the writer chose: never written by the shop for them
articleCountnumberhow many articles the shop has published by them: counted by the shop
linksLink[]their own pages: a site, a profile
Link authors[].links[] · 4 props
PropTypeDescription
label*stringWordsthe link’s words, e.g. "See the collection"
actionstringActiona named action of the page
recordRecord<string, unknown>Datathe record the action applies to, passed to the host with it, if any
urlstringDesignan address outside the app
TopArticle topArticles[] · 9 props
PropTypeDescription
id*string | numberDatathe record’s id in the tool that answers it
title*stringWordsthe article’s title
excerptstringWordsa sentence or two from the article
imagestringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordswhat the cover picture shows
sectionstringWordsthe section it belongs to, e.g. "Guides"
authorAuthorwho wrote it
datestringWordswhen it was published, as the site writes it
readingTimestringWordshow long it takes to read, e.g. "6 min"
Author topArticles[].author · 6 props
PropTypeDescription
idstring | numberDatathe record’s id in the tool that answers it
name*stringWordsthe person’s name
rolestringWordstheir role or job title
companystringWordswhere they work
avatarstringPicturea picture: a root-relative path (/media/…) or an absolute URL
urlstringDesigna page about them
Options options · 2 props
PropTypeDescription
showBiobooleanwhether the author’s bio is shown
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: authors[].links[], open, openAuthor
  • Reads authors, articles from your app

A article section, for article, journal pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, 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.
  • Interview classic: a printed interview: the person introduced above, questions in bold, answers in a calm column, pull quotes between.
  • Interview conversation: questions and answers as two voices on opposite sides, the person’s portrait beside each answer: a lighter, human interview.
  • Interview margin names: speakers named in a margin column, the text beside them: a long interview read like a transcript.
  • 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.

All 29 article blocks