Meter list segmented split — Features block

Pro

features-meter-list-segmented-split · for home, landing, app pages

Meter list segmented split

A segmented total paired with an explanatory ledger; 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-meter-list-segmented-split

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import FeaturesMeterListSegmentedSplit from '@/components/trame/blocks/features/features-meter-list-segmented-split.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>
<FeaturesMeterListSegmentedSplit 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
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
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

  • 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.
  • Measured composition stacked: Composition of a total beside its supplied comparison; 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.
  • 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.

All 45 features blocks