Workshop photos photo essay — Gallery block

Pro

gallery-workshop-photos-photo-essay · for about, product pages

Workshop photos photo essay

Captioned pictures of the workshops in balanced rows, the caption being the content: a visit told in pictures

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-workshop-photos-photo-essay

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import GalleryWorkshopPhotosPhotoEssay from '@/components/trame/blocks/gallery/gallery-workshop-photos-photo-essay.vue'

const props = {
title: "A day in the workshop",
photos: [
{
src: "https://images.unsplash.com/photo-1695898341950-6b78780c1458?w=1600&q=80",
alt: "Looms lined up in a workshop",
caption: "Weaving, on a Monday morning"
},
{
src: "https://images.unsplash.com/photo-1588497883177-f82b883ad0af?w=1600&q=80",
alt: "Hands guiding a pale fabric under the needle of a sewing machine",
caption: "Machine assembly"
}
]
}
</script>

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

Props

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

PropTypeDescription
title*stringWordswhat the page says about the workshops ("A day in the workshop")
leadstringWordsone sentence on how the merchant chooses and visits them
photos*Photo[]pictures from the workshops, with their captions
footnotestringWordsa line on the makers we left, or how often audits are done
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Photo photos[] · 3 props
PropTypeDescription
srcstringPicturea picture: a root-relative path (/media/…) or an absolute URL
alt*stringWordswhat the picture shows: required, the caption alone may not say it
caption*stringWordsthe caption: it is the content ("Weaving, on a Monday morning")
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
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

A gallery section, for about, product pages; it uses @lucide/vue, clsx, motion, tailwind-merge.

More gallery blocks

  • 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.
  • 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.
  • Series triptych: series of up to three pictures, each series with its title and caption, stacking down the page and swiping on a phone: work shown in sets.
  • Stage: one large picture on a stage with its caption, and a filmstrip of thumbnails to pick the next: four to twelve pictures of one series to look at closely, one by one.
  • Strip: tall pictures in a row that scrolls sideways past the page’s edge, with a count: a photo essay told in order.

All 23 gallery blocks