Grid cards — Features block
Profeatures-grid-cards · for home, landing, product pages
Grid cards
Benefits in bordered cards, the closing action filling the last empty cell: a firmer grid
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-grid-cardsUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import FeaturesGridCards from '@/components/trame/blocks/features/features-grid-cards.vue'
const props = {
eyebrow: "Our commitments",
title: "What you can expect from us",
intro: "Simple promises we keep, order after order.",
items: [
{
icon: "truck",
title: "Free shipping over $60",
text: "Ships within 48 hours from our workshop, tracked by email."
},
{
icon: "returns",
title: "30-day returns",
text: "Not quite right? Send it back for free from a pickup point."
}
],
cta: {
label: "Read all our commitments",
action: "page",
record: {
id: "engagements"
}
}
}
</script>
<template>
<FeaturesGridCards v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordswhat this section is about ("Why us") |
| title* | string | Wordsthe section’s title, in a few words |
| intro | string | Wordsone or two sentences under the title |
| items* | Item[] | the items shown, in order |
| cta | Cta | the call to action under the grid |
| footnote | string | Wordsa small honest line (how a figure was measured, when it was checked) |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Item items[] · 7 props
| Prop | Type | Description |
|---|---|---|
| icon | string | Designa icon name: truck, shield, returns, leaf, heart, star, sparkles, clock, card, gift, package, people, bolt, pin, message, phone, recycle, award, sun, store, hand, ruler, droplet, flame; none shows a number |
| title* | string | Wordsthe benefit, in a few words |
| text | string | Wordsone sentence that says it plainly |
| action | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
| actionLabel | string | Wordsthe words of the item’s link, shown under it ("See the lead times"); without them the title alone is the link |
| proof | string | Wordsa figure or a fact the merchant owns ("60 days to change your mind"), never an invented one |
Cta cta · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("See all our commitments") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| columns | number | how many columns on wide screens, 2 to 4 |
| 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 |
| 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
- Subtle motion: one short reveal; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
items[],cta
A features section, for home, landing, product pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.
More features blocks
- Chapters bands: the same stages as a calm editorial sequence, each opening on a ruled header row and one full-bleed picture with its features in an even row below: when every stage has a strong wide picture, and on dark or brand bands.
- Chapters spy index: a large product told stage by stage on a light page: a sticky numbered index of the stages lights up the one in view beside its words and a grid of feature cards (a pill row on a phone), for visitors who scan and jump.
- Coverage map list: continents as columns under a dotted band, each country on a dotted leader to its currency: a calm, scannable map without a map.
- Coverage regions: a card per continent with its countries and what is available there overall: a quick answer to "do you work in my country?".
- Coverage table: one table, a row per country with languages, currencies, payment and shipping side by side: a visitor who needs to compare precisely.
- 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.