Split visual plus stats — Features block

Pro

features-split-visual-plus-stats · for home, landing, product pages

Split visual plus stats

One capability with its picture and a band of figures the merchant measured: proof next to the promise

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-split-visual-plus-stats

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import FeaturesSplitVisualPlusStats from '@/components/trame/blocks/features/features-split-visual-plus-stats.vue'

const props = {
title: "What changes when you order from us",
intro: "Three commitments we keep every day, with concrete answers to your questions.",
rows: [
{
title: "Order tracking that answers before you ask",
text: "Every parcel has its own page: where it is, who is carrying it, when it arrives. No more emailing customer service to find out.",
bullets: [
"The tracking link goes out as soon as it ships",
"Address changes until the order is packed"
],
media: "https://images.unsplash.com/photo-1585060282215-39a72f82385c?w=1600&q=80",
alt: "A hand holding a smartphone with a blank screen, on a white background",
link: {
label: "See how it works",
action: "page",
record: {
id: "suivi"
}
}
},
{
title: "Simple returns, no endless forms",
text: "Thirty days to change your mind. The label takes two clicks, and the refund follows once we receive the parcel.",
bullets: [
"Prepaid return label",
"Size exchange in one step"
],
media: "https://images.unsplash.com/photo-1631010231888-777b6285ef84?w=1600&q=80",
alt: "A large upright kraft box with a blank white label",
link: {
label: "Read the return policy",
action: "page",
record: {
id: "retours"
}
}
}
]
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe section’s title, an h2
introstringWordsone or two sentences under the title
rows*Row[]the rows shown, in order
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Row rows[] · 7 props
PropTypeDescription
title*stringWordsthe capability, in a few words ("Track every order")
textstringWordsone short paragraph saying what it does for the visitor
bulletsstring[]Wordsone concrete point, as the merchant would say it
mediastringPicturethe merchant’s own picture or screenshot of it
altstringWordswhat the picture shows, when the words do not say it
linkLinkthe link: its words and the page action it runs
statsStat[]the row’s stats, in order
Link rows[].link · 3 props
PropTypeDescription
label*stringWordswhat happens ("Discover tracking")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
Stat rows[].stats[] · 2 props
PropTypeDescription
value*stringWordsa figure the merchant measured ("48 h")
label*stringWordswhat it counts
Options options · 2 props
PropTypeDescription
frame'none' | 'browser' | 'phone'what frames each picture: none, a browser or a phone
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: rows[].link

A features section, for home, landing, product pages; it uses @lucide/vue, clsx, motion, tailwind-merge.

Built with

The components this block is made of; each one installs on its own too.

More features blocks

  • 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.
  • Sectors expand panels: tall panels side by side, the open one widens to show its sentence, link and picture: 3 to 6 sectors with good pictures, the section’s bold moment; the sectors the merchant really serves only.
  • Sectors reveal tiles: equal tiles with an icon and a name, the active one turns dark to show its sentence and link over its picture: 4, 6 or 8 short sectors, a playful grid; the sectors the merchant really serves only.
  • Sectors ruled index: a large heading then one ruled row per sector with its icon, sentence and a small picture: a sober, readable list for 4 to 8 sectors, in a B2B or about page; the sectors the merchant really serves only.
  • Spotlight capsule trio: three tall rounded cards, each a promise or an audience with a picture strip at the foot: a few big ideas.
  • Spotlight isometric trio: three open columns, each a supplied illustration with a figure caption and a sentence: calm, explanatory.
  • Tour wide picture: 3 to 5 features as a row of headers over a wide picture, the open one’s words below it: a tour of a few big ideas with large screenshots.

All 45 features blocks