Song lyrics and credits — Media block

Pro

media-song-lyrics-and-credits · for home, landing pages

Song lyrics and credits

Author supplied lyrics beside their story and credits; 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-song-lyrics-and-credits

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import MediaSongLyricsAndCredits from '@/components/trame/blocks/media/media-song-lyrics-and-credits.vue'

const props = {
title: "Session notebooks",
intro: "Demo titles and lyrics. No invented artist credits, dates or streaming figures.",
lyrics: [
"The light follows the walls",
"And the room becomes a road"
],
items: [
{
title: "The Open Window",
subtitle: "A musical sketch built around the sounds from outside."
},
{
title: "Covered Passage",
subtitle: "A session idea recorded as close to the instruments as possible."
}
]
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe section’s heading
introstringWordsa sentence or two under the heading
items*Item[]the titles of the story, each with its words
lyrics*string[]Wordsthe lyrics, one line or stanza each
creditsCredit[]the song’s credits, each a role and a name
ctaCtathe call to action: its words and the page action it runs
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Item items[] · 2 props
PropTypeDescription
title*stringWordsthe item’s title
subtitlestringWordsa line under the item’s title
Credit credits[] · 2 props
PropTypeDescription
label*stringWordswhat the value is about
value*stringWordsthe value, as the merchant states it
Cta cta · 2 props
PropTypeDescription
label*stringWordsthe words on the button or link
action*stringActiona named action of the page
Options options · 1 props
PropTypeDescription
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
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: cta

A media section, for home, landing pages; it uses @lucide/vue, class-variance-authority, clsx, reka-ui, tailwind-merge.

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.
  • 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.
  • 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.
  • 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.

All 12 media blocks