Media credits sessions — Gallery block
Progallery-media-credits-sessions · for home, landing pages
Media credits sessions
Session cards with credited context and a link to the recording; 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/gallery-media-credits-sessionsUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import GalleryMediaCreditsSessions from '@/components/trame/blocks/gallery/gallery-media-credits-sessions.vue'
const props = {
title: "Session Notebooks",
intro: "Demo titles and texts. No invented artist credits, dates or play counts.",
items: [
{
title: "The Open Window",
subtitle: "A musical sketch built around the sounds outside.",
image: "https://images.unsplash.com/photo-1516280440614-37939bbacd81?w=1600&q=80",
alt: "A microphone against a dark background"
},
{
title: "Covered Passage",
subtitle: "A session idea recorded close to the instruments."
}
]
}
</script>
<template>
<GalleryMediaCreditsSessions v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe section’s heading |
| intro | string | Wordsa sentence or two under the heading |
| items* | Item[] | the items shown, in order |
| 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 |
Item items[] · 8 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe item’s title |
| subtitle | string | Wordsa line under the item’s title |
| year | string | Wordsthe year it came out |
| role | string | Wordswhat the person did on it |
| image | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordswhat the picture shows |
| href | string | Actiona named action of the page |
| duration | string | Wordshow long it lasts, e.g. "3:42" |
Cta cta · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe words on the button or link |
| action* | string | Actiona named action of the page |
Options options · 1 props
| Prop | Type | Description |
|---|---|---|
| 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:
items[].href,cta
A gallery section, for home, landing pages; it uses @lucide/vue, class-variance-authority, clsx, reka-ui, tailwind-merge.
More gallery blocks
- Making of stacked cards: one wide card per step, picture and words side by side, the cards piling up on each other as the page scrolls: three to eight steps told one at a time, on a brand or story page; the merchant’s own workshop only.
- Making of thread: the steps alternating left and right along a vertical thread that fills as the page scrolls, a numbered knot for each: a longer making-of (six to twelve steps) read from top to bottom; the merchant’s own workshop only.
- Marquee rows: two rows of rounded pictures sliding in opposite directions, still until played: a lively wall of atmosphere on a landing.
- Masonry: a handful to a dozen pictures of mixed shapes, read top to bottom in columns, each with its caption: a general gallery.
- Mosaic: one lead picture and a tiled wall around it, folded into "+n" past nine: a series with a clear best picture.
- Photo essay full bleed: each chapter opens on a title and its pictures run edge to edge, drifting slowly, with a narrow caption under each: a few very strong pictures that need the whole width.
- Photo essay pinned captions: a caption column that stays in view while the chapter’s large pictures scroll past: a trip, a making-of or a reportage told picture by picture.
- Photo essay spreads: magazine spreads where a large and a small picture sit off-centre on a grid with the chapter’s words between them: an editorial, slower read of a series.