Photo essay full bleed — Gallery block

Pro

gallery-photo-essay-full-bleed · for home, landing, article pages

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

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-photo-essay-full-bleed

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import GalleryPhotoEssayFullBleed from '@/components/trame/blocks/gallery/gallery-photo-essay-full-bleed.vue'

const props = {
title: "Four days on the ridge",
intro: "A traverse of the range told in pictures by the workshop team, from the first pass to the last summit.",
chapters: [
{
title: "Setting out",
text: "Five thirty, the pack still light. The sun isn’t up yet, but the forest is already full of sounds.",
images: [
{
src: "https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=1800&q=80",
alt: "A trail through a forest of tall trees",
caption: "Under the tall trees, before the climb."
},
{
src: "https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?w=1800&q=80",
alt: "A green valley under a sunset sky"
}
]
},
{
title: "The ridge",
text: "Two days above the clouds, walking single file along a line of rock, the wind at our backs.",
images: [
{
src: "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1800&q=80",
alt: "A snowy ridge at sunrise above a sea of clouds",
caption: "Needle Ridge, 6:40 a.m., the first day of the traverse."
},
{
src: "https://images.unsplash.com/photo-1454496522488-7a8e488e8606?w=1800&q=80",
alt: "A snowy summit under a clear sky",
caption: "The summit, around noon."
}
]
}
],
action: {
label: "Read the full journal",
action: "page",
record: {
id: "carnet"
}
},
options: {
chapterLabel: "Chapter"
}
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe essay’s title ("Four days on the ridge")
introstringWordsone or two lines of introduction: who, where, why
chapters*Chapter[]the chapters in the order of the story, one to six, each with at least one picture
actionActionthe call to action: its words and the page action it runs
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Chapter chapters[] · 3 props
PropTypeDescription
title*stringWordsthe chapter’s title, as the author wrote it ("The start")
textstringWordstwo or three sentences telling this chapter, in the author’s words
images*Image[]the chapter’s pictures, in the order they are read
Image chapters[].images[] · 3 props
PropTypeDescription
src*stringPicturea picture: a root-relative path (/media/…) or an absolute URL
alt*stringWordswhat the picture shows, in a sentence: required, it is the picture for those who do not see it
captionstringWordsthe author’s caption, if the picture has one (place, hour, a detail)
Action action · 3 props
PropTypeDescription
label*stringWordswhat happens at the end ("Read the full notebook")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
Options options · 2 props
PropTypeDescription
chapterLabelstringWordsthe word before a chapter’s number ("Chapter"); the app’s own when absent
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
  • Expressive motion, within its budget; still under reduced motion
  • Real buttons and links, a visible focus
  • Asks your app through actions: action

A gallery section, for home, landing, article pages; it uses class-variance-authority, clsx, motion, reka-ui, tailwind-merge.

More gallery blocks

  • 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.
  • Media credits list: A quiet production ledger ordered by the supplied entries; the merchant’s own only.
  • Media credits sessions: Session cards with credited context and a link to the recording; the merchant’s own only.
  • Mosaic: one lead picture and a tiled wall around it, folded into "+n" past nine: a series with a clear best picture.
  • Prints: pictures as loose prints on a table, slightly turned and straightening on hover: an informal, human wall of a maker’s or a trip’s snapshots.
  • Scatter: five to nine small pictures of three sizes placed around a centred heading with plenty of air: a playful, airy wall of objects, products or details.
  • Series alternating facts: each series’ lead picture beside its title, text and table of facts (place, equipment, date), the next one mirrored: a photographer’s or maker’s portfolio.

All 23 gallery blocks