Film transcript split — Media block
Promedia-film-transcript-split · for home, product, about, landing pages
Film transcript split
The poster, its summary and the words of the film in a scrolling transcript: a film that must be readable and searchable; the merchant’s own only
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/media-film-transcript-splitUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import MediaFilmTranscriptSplit from '@/components/trame/blocks/media/media-film-transcript-split.vue'
const props = {
poster: "https://images.unsplash.com/photo-1762628727567-250080e7e9a3?w=1600&q=80",
video: "/media/films/atelier.mp4",
title: "A day in the workshop, from dawn to the last snip of the scissors",
summary: "We left a camera running through a whole day of making. No commentary: just the sound of the tools, the hands and the people they belong to.",
points: [
"Sorting materials at opening time",
"Cutting, assembly and inspection"
],
facts: [
{
label: "Location",
value: "Our workshop, in Portland"
},
{
label: "Filmed",
value: "One day in September"
}
],
transcript: [
{
time: "00:00",
text: "It’s seven a.m. The workshop opens, and the machines come on one by one."
},
{
time: "00:45",
text: "Every piece goes through three pairs of hands before it leaves for the shop."
}
],
cta: {
label: "Explore the collection",
action: "collection",
record: {
id: "atelier"
}
},
options: {
eyebrow: "The workshop film",
alt: "A potter at her wheel, in a bright studio",
duration: "3 min"
}
}
</script>
<template>
<MediaFilmTranscriptSplit v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| poster | string | Picturethe picture shown before the video plays |
| video* | string | Picturethe video: a file (.mp4,.webm) or the address of the player to embed; nothing is fetched before the visitor presses play |
| title* | string | Wordswhat the film is ("The workshop, from wood to table") |
| summary | string | Wordstwo or three sentences on what the film shows |
| points | string[] | Wordsone thing the film shows or says, in a few words |
| facts | Fact[] | the facts shown, in order |
| transcript* | Transcript[] | the film’s transcript, passage by passage |
| cta | Cta | the call to action: its words and the page action it runs |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Fact facts[] · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat the fact is ("Place", "Work") |
| value* | string | Wordsthe fact, as the merchant gives it |
Transcript transcript[] · 2 props
| Prop | Type | Description |
|---|---|---|
| time | string | Wordsthe time mark as written ("00:45") |
| text* | string | Wordswhat is said, as supplied |
Cta cta · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("Discover the collection") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Options options · 5 props
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordswhat kind of film it is ("The workshop film") |
| alt | string | Wordsthe poster’s description, when it shows something the title does not say |
| duration | string | Wordsits length as the merchant wrote it ("3 min"), never computed |
| reverse | boolean | true: swaps the picture and the words |
| 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
A media section, for home, product, about, landing pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.
Built with
The components this block is made of; each one installs on its own too.
More media blocks
- Episode clips rails: short episodes or clips in horizontal rails grouped by theme: a video series or a show with highlights; the merchant’s own only.
- Episode transcript tabs: one episode: its player, a summary and a transcript in tabs, platforms, previous and next: the page of an episode; the merchant’s own only.
- Film introduction split: the poster beside its summary, key points and action: a product or episode introduction; the merchant’s own only.
- Film preview lightbox: a small poster tile that opens the film in a dialog: a secondary film that must not take the page; the merchant’s own only.
- Podcast featured grid: one episode large on a dark panel, the recent ones as cards with guest, date and length: a show with a face and a few episodes; the merchant’s own only.
- Podcast rows: numbered hairline rows with title, summary, date and length, readable without pictures: a long archive; the merchant’s own only.
- Song lyrics and credits: Author supplied lyrics beside their story and credits; the merchant’s own only.
- Video feature poster wide: a wide poster under its title with the facts beneath: a brand film or a customer story that deserves the full width; the merchant’s own only.