Object specs rail — Features block
Profeatures-object-specs-rail · for home, product, landing pages
Object specs rail
One object with measurable specs: a rail of real values beside its picture, marked parts explained one at a time
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/features-object-specs-railUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import FeaturesObjectSpecsRail from '@/components/trame/blocks/features/features-object-specs-rail.vue'
const props = {
title: "The Atelier bag, piece by piece",
intro: "One model, handmade in our workshop: here is what goes into it.",
media: "https://images.unsplash.com/photo-1657603738389-951c374b740c?w=1600&q=80",
alt: "A cognac leather shoulder bag on a light background",
specs: [
{
label: "Weight",
value: "1.4 lb"
},
{
label: "Dimensions",
value: "13.4 × 10.2 × 4.7 in"
}
],
hotspots: [
{
x: "30",
y: "28",
title: "Reinforced handle",
text: "Stitched across its full width, it holds up to 26 lb.",
action: "page",
record: {
id: "anse"
}
},
{
x: "62",
y: "55",
title: "Zippered inside pocket",
text: "Big enough for a passport and a phone."
}
],
items: [
{
title: "Vegetable-tanned leather",
text: "Tanned in the USA without chrome, it develops a patina over the years.",
icon: "leaf",
media: "https://images.unsplash.com/photo-1716295177956-420a647c83ac?w=1600&q=80",
alt: "Close-up of tanned leather"
},
{
title: "Saddle stitching",
text: "Two needles and waxed thread: a seam that won’t come undone.",
icon: "ruler",
media: "https://images.unsplash.com/photo-1568288796918-03e7d93306bd?w=1600&q=80",
alt: "A seam sewn by hand"
}
],
cta: {
label: "See the bag",
action: "product",
record: {
id: "atelier"
}
}
}
</script>
<template>
<FeaturesObjectSpecsRail v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe section’s title, an h2 |
| intro | string | Wordsone or two sentences under the title |
| media | string | Picturethe flagship object, ideally a clean or cut-out picture, the merchant’s own |
| alt | string | Wordswhat the picture shows |
| specs* | Spec[] | the object’s measures, each a label and its real value, e.g. "Weight" |
| hotspots | Hotspot[] | the points pinned on the picture |
| items | Item[] | the items shown, in order |
| cta | Cta | the call to action: its words and the page action it runs |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Spec specs[] · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe measure ("Weight") |
| value* | string | Wordsits real value ("640 g") |
Hotspot hotspots[] · 6 props
| Prop | Type | Description |
|---|---|---|
| x* | string | Designhorizontal position on the picture, in percent ("32") |
| y* | string | Designvertical position on the picture, in percent ("58") |
| title* | string | Wordsthe marked part, in a few words |
| text | string | Wordsone sentence about it |
| action | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Item items[] · 5 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe facet, audience or promise, in a few words |
| text | string | Wordsone sentence |
| icon | string | Designa pictogram (leaf, ruler, shield, sparkles, truck, heart, recycle, hand, star, clock, package, sun) |
| media | string | Picturea picture or illustration for it, supplied by the merchant |
| alt | string | Wordswhat that picture shows |
Cta cta · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("See the product") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
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 |
| Link | your router’s link component |
| 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
- Expressive motion, within its budget; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
hotspots[],cta
A features section, for home, product, landing pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.
More features blocks
- Measured composition stacked: Composition of a total beside its supplied comparison; the merchant’s own only.
- Meter list bars: Labelled measurements with a shared scale per row; the merchant’s own only.
- Meter list ring cards: Radial scores with their exact denominator and reference; the merchant’s own only.
- Meter list segmented split: A segmented total paired with an explanatory ledger; the merchant’s own only.
- Object tiles burst: two to six benefits, each an object cut out of its photo bursting from the top of its own solid square tile, words under it: a studio, a club or a maker whose offer is easiest to see as things.
- Object tiles shelf: the same objects standing on one long solid band that runs the width of the page, crossing its top edge, the words under each: a calmer, wider line for three to six items (on a phone, a list of small tiles beside their words).
- Rows alternating: rows that alternate words and a live mini-interface from side to side: 2 to 4 features of equal weight read down the page; figures, quotes and messages are the merchant’s own only.
- Rows sticky rail: a sticky menu of the features beside rows that scroll past it, the current one lit: 4 to 6 features a visitor may jump between; figures, quotes and messages are the merchant’s own only.