Media credits sessions — Gallery block

Pro

gallery-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-sessions

Usage

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.

PropTypeDescription
title*stringWordsthe section’s heading
introstringWordsa sentence or two under the heading
items*Item[]the items shown, in order
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[] · 8 props
PropTypeDescription
title*stringWordsthe item’s title
subtitlestringWordsa line under the item’s title
yearstringWordsthe year it came out
rolestringWordswhat the person did on it
imagestringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordswhat the picture shows
hrefstringActiona named action of the page
durationstringWordshow long it lasts, e.g. "3:42"
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
asseta picture’s address as your app serves it
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: 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.

All 23 gallery blocks