Service side card — Hero block
Prohero-service-side-card · for home, landing pages
Service side card
Someone who sells a service: what is offered, with the one-line scope and the price of each, in a card beside the intro — 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/hero-service-side-cardUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import HeroServiceSideCard from '@/components/trame/blocks/hero/hero-service-side-card.vue'
const props = {
eyebrow: "Physiotherapy clinic, Portland",
title: "Back on your feet, and back on the trail",
subtitle: "Sports injuries, back pain and recovery after surgery, for people who would rather move well than rest for months. Six physiotherapists, and one of them with you from the first assessment to the last session.",
facts: [
{
label: "Based in",
value: "14 Willow Street, Portland"
},
{
label: "First appointment",
value: "Within the week"
}
],
services: [
{
title: "First assessment",
text: "An hour to find the cause, not just the sore spot.",
price: "$140"
},
{
title: "Sports injury rehab",
text: "A plan built backwards from your next race or season.",
price: "From $110 a session"
}
],
primaryAction: {
label: "Book an assessment",
action: "contact"
},
secondaryAction: {
label: "Meet the team",
action: "work"
},
options: {
availability: "Appointments free this week",
factsTitle: "Services"
}
}
</script>
<template>
<HeroServiceSideCard v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordswho and where, in a few words ("Design studio, Lyon") |
| title* | string | Wordsthe name or the statement, in a sentence |
| subtitle* | string | Wordsone paragraph: what is done, for whom, how |
| facts | Fact[] | the facts shown, in order |
| services* | Service[] | the services offered, each with a line |
| primaryAction* | PrimaryAction | the main button: its words and the page action it runs |
| secondaryAction | SecondaryAction | a quieter second action beside the main one: its words and the page action |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Fact facts[] · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat the fact is ("Based in") |
| value* | string | Wordsits value, as the owner states it |
Service services[] · 3 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe service |
| text | string | Wordsone line on what it covers |
| price | string | Wordsthe price or the "from" price, in the owner’s words |
PrimaryAction primaryAction · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("Start a project") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
SecondaryAction secondaryAction · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("Start a project") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Options options · 3 props
| Prop | Type | Description |
|---|---|---|
| availability | string | Wordsthe owner’s availability, in their words ("Available from January") |
| factsTitle | string | Wordsthe heading of the side card ("Awards", "Services") |
| 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:
primaryAction,secondaryAction
A hero section, for home, landing pages; it uses @lucide/vue, 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 hero blocks
- Reel mosaic: the promise centred on a quiet pattern that lights up around the pointer (the grid with a few brief light streaks), then a calm bento of short muted clips within the page width: a studio, a tool or a library whose own work is the argument (the host’s own work only).
- Reel side: the mosaic turned on its side: a wide feature clip with up to three smaller ones under it on the start side, the promise beside them aligned to the start, over the same quiet pattern: a studio, a tool or a library that leads with one piece of its work and wants the words read alongside it (the host’s own work only).
- Reel tilted wall: the same centred promise over a wall of clips laid on a plane turned in 3D, running off both edges and fading at the foot: a body of work seen as a whole, more atmosphere than detail (the host’s own work only).
- Request bar: one to three short fields in a single bar under a centred promise: an address to leave, a quick callback.
- Shopfront facade: the shop’s front edge to edge, the invitation over its foot and the address and hours on a card set like a plaque beside the door: a shop whose street front is its best picture (a bakery, a florist, a bookshop).
- Shopfront shop window: the words, the address and the hours as a ruled timetable on the page’s ground, the front in a tall arched window with the inside pictures set against it: a calmer opening, or a front photographed close.
- Showcase framed media: a product or an app with a screenshot: the words on top, the picture in a frame running off the fold.
- Signature corner tiles: one full-bleed picture with the promise at its lower left and the pieces as small picture tiles in the lower-right corner: fashion or accessories, where the picture is the argument and the products a discreet addition.