Podcast featured grid — Media block
Promedia-podcast-featured-grid · for home, podcast, landing pages
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
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-podcast-featured-gridUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import MediaPodcastFeaturedGrid from '@/components/trame/blocks/media/media-podcast-featured-grid.vue'
const props = {
show: {
name: "In the Workshop",
tagline: "Hour-long conversations with the people who make, repair and pass on their craft.",
cover: "https://images.unsplash.com/photo-1668537338628-85b9970bf17f?w=1600&q=80",
alt: "Two microphones on a recording table in front of light panels",
hostName: "Camille Lenoir",
hostBio: "Camille opened the workshop ten years ago. Every other week she welcomes someone whose work she admires.",
platforms: [
{
label: "Apple Podcasts",
action: "platform",
record: {
id: "apple"
}
},
{
label: "Spotify",
action: "platform",
record: {
id: "spotify"
}
}
]
},
episodes: [
{
id: "ep-12",
number: 12,
title: "Repair, don’t replace",
guest: "Louise, shoemaker",
summary: "A sole can be redone ten times. Louise explains what makes an object worth keeping, and how she tells her customers.",
date: "October 14",
duration: "47 min",
theme: "Craft",
cover: "https://images.unsplash.com/photo-1478737270239-2f02b77fc618?w=1600&q=80",
alt: "The recording setup",
audio: "/media/episodes/12.mp3",
action: "episode"
},
{
id: "ep-11",
number: 11,
title: "The first workshop",
guest: "Marc, cabinetmaker",
summary: "Renting a space, buying your first machines, accepting that you won’t make a living the first year.",
date: "September 30",
duration: "52 min",
theme: "Craft",
cover: "https://images.unsplash.com/photo-1478737270239-2f02b77fc618?w=1600&q=80",
alt: "The recording setup",
audio: "/media/episodes/11.mp3",
action: "episode"
}
],
featured: "ep-12"
}
</script>
<template>
<MediaPodcastFeaturedGrid v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| show* | Show | the show: its name, its line and where to listen |
| episodes* | Episode[] | Datathe episodes in reading order (newest first), from the merchant’s feed |
| featured | string | Designthe id of the episode to put forward; the first one when absent |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Show show · 7 props
| Prop | Type | Description |
|---|---|---|
| name* | string | Wordsthe show’s name |
| tagline | string | Wordswhat the show is about, in one sentence |
| cover | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordsthe cover’s description |
| hostName | string | Wordswho hosts the show |
| hostBio | string | Wordsone or two sentences on the host, written by them |
| platforms | Platform[] | where to listen, one link per platform |
Platform show.platforms[] · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhere to listen ("Apple Podcasts"), only the platforms the show is on |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Episode episodes[] · 12 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Designthe episode’s identifier, unique in the list |
| number | number | the episode’s number |
| title* | string | Wordsthe episode’s title |
| guest | string | Wordswho is on the show, as the merchant names them |
| summary | string | Wordstwo or three sentences on what the episode says |
| date | string | Wordsits publication date as the merchant wrote it ("12 September"), never computed |
| duration | string | Wordsits length as the merchant wrote it ("42 min"), never invented |
| theme | string | Wordsthe theme or series it belongs to, for the grouped rows |
| cover | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordsthe cover’s description, when it shows something the title does not say |
| audio | string | Picturethe episode’s audio file; it loads only when the visitor presses play |
| action | string | Actionthe page of the episode |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| showNumbers | boolean | false: hides the episodes’ numbers |
| 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:
show.platforms[],episodes[] - Reads
episodesfrom your app
A media section, for home, podcast, 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
- Discography wall: three to twelve releases whose covers lean towards the pointer, one opening its tracklist and formats beside the wall: a catalogue to browse by sleeve.
- 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.
- 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.
- 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.