Measured composition stacked — Features block

Pro

features-measured-composition-stacked · for home, landing, app pages

Measured composition stacked

Composition of a total beside its supplied comparison; the merchant’s own only.

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-measured-composition-stacked

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import FeaturesMeasuredCompositionStacked from '@/components/trame/blocks/features/features-measured-composition-stacked.vue'

const props = {
title: "How much room words take",
intro: "Measurements of this demo’s labels, with no business metric.",
footnote: "Source: length of the labels in the demo.ts file, computed when the demo was created.",
measures: [
{
label: "Documentation",
value: 13,
max: 40,
unit: "characters",
note: "Length of the displayed label, spaces included."
},
{
label: "Getting going",
value: 13,
max: 40,
unit: "characters",
note: "Length of the displayed label, spaces included."
}
]
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe section’s heading
introstringWordsa sentence or two under the heading
footnote*stringWordsRequired source and measurement period
measures*Measure[]the measures, each a value on a scale
comparisonComparisona figure to compare the measures with
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Measure measures[] · 6 props
PropTypeDescription
label*stringWordswhat the figure is
value*numberDatathe measured value
max*numberDatathe top of the scale
unitstringWordsthe unit written after the figure
notestringWordsa short note on the measure
compareTonumberDataa value to compare it with, on the same scale
Comparison comparison · 2 props
PropTypeDescription
label*stringWordswhat the figure is
value*numberDatathe figure compared with
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
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 features section, for home, landing, app pages; it uses clsx, motion, tailwind-merge.

More features blocks

  • Coverage table: one table, a row per country with languages, currencies, payment and shipping side by side: a visitor who needs to compare precisely.
  • Grid cards: benefits in bordered cards, the closing action filling the last empty cell: a firmer grid.
  • Grid icons open: 3 or 6 benefits with no card, an icon above each title: the quiet default.
  • Grid inverse panel: the whole grid on one dark rounded panel: the single bold moment of a page.
  • 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 specs rail: one object with measurable specs: a rail of real values beside its picture, marked parts explained one at a time.

All 45 features blocks