Featured image frame study — Gallery block

Pro

gallery-featured-image-frame-study · for home, landing, article, product pages

Featured image frame study

One picture shown large with its caption in mono, its table of facts and one action (order a print): a single image that deserves a page

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-featured-image-frame-study

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import GalleryFeaturedImageFrameStudy from '@/components/trame/blocks/gallery/gallery-featured-image-frame-study.vue'

const props = {
title: "Needle Ridge, at dawn",
image: {
src: "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1600&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 crossing."
},
facts: [
{
label: "Location",
value: "Chartreuse Mountains"
},
{
label: "Gear",
value: "Mirrorless body, 35 mm lens"
}
],
details: [
{
src: "https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=1600&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=1600&q=80",
alt: "A green valley under a sunset sky"
}
],
action: {
label: "Order a print",
action: "page",
record: {
id: "tirages"
}
}
}
</script>

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

Props

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

PropTypeDescription
titlestringWordsthe work’s title, if it has one
image*Imagethe picture; its caption is shown in mono beside it
factsFact[]the author’s key figures of the picture: place, equipment, date, print sizes
detailsDetail[]other views of the same work (a detail, the framed print), if the author has them
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
Image image · 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
Fact facts[] · 2 props
PropTypeDescription
label*stringWords("Place", "Equipment", "Pictures")
value*stringWordsas the author wrote it: no estimate, no invented edition size
Detail details[] · 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
Action action · 3 props
PropTypeDescription
label*stringWordswhat happens ("See the series", "Order a print")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
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
  • 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, product pages; it uses class-variance-authority, clsx, motion, reka-ui, tailwind-merge.

More gallery blocks

  • Card deck: a deck of rounded cards stacked in the centre, the top one sent to the back with the arrows, the dots or a swipe: five to ten portraits or covers shown one by one with some play.
  • Coverflow: the centred picture flat and largest, two neighbours on each side turned in depth like a stack of records being flipped through, the centred one opening large on a click: six to twelve covers, portraits or objects leafed through one at a time.
  • Expandable: three to ten pictures in balanced panels with a close-up on hover: a quiet, tactile gallery with stable geometry.
  • Focus carousel: a single row where the centred picture is the largest, with arrows and a progress bar: a few strong pictures one at a time.
  • Making of rail: tall step cards in a row that scrolls sideways, a large number over each picture and a bar showing how far along the row is: a home or product band that shows the making in a glance; the merchant’s own workshop only.
  • 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.

All 23 gallery blocks