Capability bento spotlight — Features block
Profeatures-capability-bento-spotlight · for home, landing, product pages
Capability bento spotlight
One tall lead tile on the start side and the others two by two beside it, each piece of the product above its words, bleeding off the corner: one capability that leads and a few that back it; figures, names and messages are 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-capability-bento-spotlightUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import FeaturesCapabilityBentoSpotlight from '@/components/trame/blocks/features/features-capability-bento-spotlight.vue'
const props = {
eyebrow: "Platform",
title: "Everything you need to take payments",
intro: "One API for charging, paying out and keeping fraud away, with a dashboard your finance team will actually open.",
action: {
label: "Start building",
action: "signup"
},
footnote: "Figures shown are from an example account.",
tiles: [
{
title: "Watch every payment land",
text: "Volume, refunds and disputes update the second they happen, in one view your whole team can read.",
size: "large",
action: {
label: "Explore reporting",
action: "page",
record: {
id: "reporting"
}
},
view: {
kind: "chart",
title: "Volume",
label: "Gross volume, last 7 days",
value: 182430,
prefix: "$",
delta: "+9.4% vs. last week",
points: [
21,
24
],
axis: [
"Mon",
"Tue"
]
}
},
{
title: "Charge in a few lines",
text: "One call creates the payment. The SDK signs, retries and keeps it idempotent for you.",
action: {
label: "Read the API reference",
action: "page",
record: {
id: "docs"
}
},
view: {
kind: "code",
title: "charge.ts",
language: "ts",
lines: [
"import { Brindle } from 'brindle'",
""
],
highlight: [
6
]
}
}
]
}
</script>
<template>
<FeaturesCapabilityBentoSpotlight v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsa short line above the title ("Platform") |
| title* | string | Wordsthe section’s title, an h2 |
| intro | string | Wordsone or two sentences under the title |
| tiles* | Tile[] | 3 to 7 capabilities, each a tile with a live piece of the product |
| action | Action | the section’s one call to action, beside the heading |
| footnote | string | Wordsa small honest line under the tiles ("Figures from an example account") |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Tile tiles[] · 5 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe capability, in a few words ("Refunds in one call"): an h3 |
| text | string | Wordsone or two sentences that say it plainly |
| view* | View | View | View | View | View | View | View | View | View | View | View | View | View | View | View | what the tile shows: a small piece of the product (a chart, figures, a conversation, rows, a board, settings, code or an object card), a diagram of marks (a hub, an orbit, a branch, the wordmark) or an assistant’s surface (a prompt, the steps of a run, a voice level); its figures, names, marks and messages are the merchant’s own only |
| size | 'large' | 'wide' | 'small' | a wish, the grid keeps it when it can: large (the lead tile; the first large one, else the first tile), wide (two columns) or small (one, by default); the grid is always full, so a wish may be turned (blocks-core parts/bento-pack.ts); side by side, large and wide ask for the wide tile of a pair |
| action | Action | where to learn more about it: the whole tile becomes a link |
Action tiles[].action · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("Try for free") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Action action · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("Try for free") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
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 |
| asset | a picture’s address as your app serves it |
| 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
- Expressive motion, within its budget; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
tiles[].action,action
A features section, for home, landing, product pages; it uses @lucide/vue, @vueuse/core, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.
Built with
The components this block is made of; each one installs on its own too.
More features blocks
- Bento poster collage: an edge-to-edge collage, picture titles set huge across them, figures on flat brand blocks: a brand with strong photography and a point of view more than a list of features.
- Bento stat tiles: text, picture and large-figure tiles mixed: when the merchant has real figures.
- Bento wide pair: two wide tiles over a row of narrower ones: five or six capabilities of similar weight.
- Capability rows checkerboard: 2 to 4 capabilities with strong square-ish photographs and short words: edge-to-edge cells with no gap, picture and words alternating like a chessboard, an architectural grid.
- Capability rows zigzag: 2 to 4 capabilities, each its own row with a picture on alternating sides, points and a link: the long, calm explanation.
- Carousel cards: 3 to 8 features as large cards with a picture above their words, buttons above the rail: the main capabilities, each with a screen.
- Carousel overlay: 3 to 8 tall pictures with their words over a calm foot, cards that lean toward the pointer: a visual, bold tour of the offer.
- Carousel side heading: 4 to 8 features after a heading column that stays beside the rail, numbered and open: a long list to browse without a heavy page.