Meter list segmented split — Features block
Profeatures-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-splitUsage
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.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe section’s heading |
| intro | string | Wordsa sentence or two under the heading |
| footnote* | string | WordsRequired source and measurement period |
| measures* | Measure[] | the measures, each a value on a scale |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Measure measures[] · 6 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat the figure is |
| value* | number | Datathe measured value |
| max* | number | Datathe top of the scale |
| unit | string | Wordsthe unit written after the figure |
| note | string | Wordsa short note on the measure |
| compareTo | number | Dataa value to compare it with, on the same scale |
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 |
| 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 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.