Story opener split — Article block
Proarticle-story-opener-split · for home, journal pages
Story opener split
A single story told as a feature opener: its cover on one half, its words on the other
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-story-opener-splitUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import ArticleStoryOpenerSplit from '@/components/trame/blocks/article/article-story-opener-split.vue'
const props = {
eyebrow: "The journal",
title: "Notes from the Brise workshop",
lead: {
id: "a1",
title: "How we choose our leathers, and why we turn half of them down",
excerpt: "A visit to the tannery, three criteria we never compromise on, and what that means for the price of a bag.",
image: "https://images.unsplash.com/photo-1637759292654-a12cb2be085e?w=1600&q=80",
alt: "Cognac-brown leather, a close-up of a fold and a seam",
section: "Materials",
author: {
name: "Camille Roussel",
role: "Workshop manager"
},
date: "2026-10-02",
readingTime: "7 min read"
},
cta: {
label: "See all articles",
action: "journal"
},
open: "article"
}
</script>
<template>
<ArticleStoryOpenerSplit v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsa small line above the title ("The journal", "Issue 41 · October 2026") |
| title* | string | Wordsthe title of the page or the section ("The workshop journal") |
| lead* | Lead | Datathe story: its cover, standfirst (excerpt), section, author, date and reading time as the merchant wrote them |
| cta | Cta | the entry to every story ("See all") |
| open | string | Actionthe action that opens the article; the article is its record |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Lead lead · 9 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe record’s id in the tool that answers it |
| title* | string | Wordsthe article’s title |
| excerpt | string | Wordsa sentence or two from the article |
| image | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordswhat the cover picture shows |
| section | string | Wordsthe section it belongs to, e.g. "Guides" |
| author | Author | who wrote it |
| date | string | Wordswhen it was published, as the site writes it |
| readingTime | string | Wordshow long it takes to read, e.g. "6 min" |
Author lead.author · 6 props
| Prop | Type | Description |
|---|---|---|
| id | string | number | Datathe record’s id in the tool that answers it |
| name* | string | Wordsthe person’s name |
| role | string | Wordstheir role or job title |
| company | string | Wordswhere they work |
| avatar | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| url | string | Designa page about them |
Cta cta · 4 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe link’s words, e.g. "See the collection" |
| action | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action applies to, passed to the host with it, if any |
| url | string | Designan address outside the app |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| showAuthors | boolean | whether the articles’ authors are shown |
| 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 |
| Link | your router’s link component |
| 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
- Asks your app through actions:
cta,open - Reads
articlesfrom your app
A article section, for home, journal pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.
More article blocks
- Quiz one by one: one question at a time with its progress: a focused quiz of five to ten questions.
- Reader desk accordion ask: questions that open onto their answer, the first one open: many questions, little room.
- Reader desk column case: numbered cases told in labelled columns (what happened, why, the lesson): repairs and lessons learnt.
- Reader desk field notes: short note cards with the place and the years of use: readers telling how they use what they bought.
- Reader desk inbox rows: the reader’s question on one side, the reply signed by a person on the other: an advice column.
- Verdict cost ledger: what an option really costs over time, as two receipts with the caveats beside them: buy once, repair, replace.
- Verdict table: several options judged one by one, a call and a reason for each: a buying guide or an extras advice.
- Verdict twin cards: two options to weigh against each other, a few comparable lines on each: which colour, which size.