Workshop photos photo essay — Gallery block
Progallery-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-essayUsage
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.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordswhat the page says about the workshops ("A day in the workshop") |
| lead | string | Wordsone sentence on how the merchant chooses and visits them |
| photos* | Photo[] | pictures from the workshops, with their captions |
| footnote | string | Wordsa line on the makers we left, or how often audits are done |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Photo photos[] · 3 props
| Prop | Type | Description |
|---|---|---|
| src | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt* | string | Wordswhat the picture shows: required, the caption alone may not say it |
| caption* | string | Wordsthe caption: it is the content ("Weaving, on a Monday morning") |
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 |
| 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
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.