Tiles heading and tiles — Services block
Proservices-tiles-heading-and-tiles · for home, services, landing, about pages
Tiles heading and tiles
The heading in a narrow column, two to four services as tall picture tiles beside it: a studio, a salon or a craftsman whose work speaks first; the merchant’s own pictures 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/services-tiles-heading-and-tilesUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import ServicesTilesHeadingAndTiles from '@/components/trame/blocks/services/services-tiles-heading-and-tiles.vue'
const props = {
title: "What the studio offers",
lead: "Classes to get started, workshops to improve, and services for those who already throw.",
allAction: {
label: "All our classes and services",
action: "page",
record: {
id: "services"
}
},
services: [
{
id: "tour",
title: "Wheel classes",
kind: "Weekly class",
text: "Two hours a week to learn to center, pull up and trim your first bowls.",
image: "https://images.unsplash.com/photo-1589051088132-06f36a22012a?w=1600&q=80",
alt: "A potter’s clay-covered hands smoothing the wall of a piece on the wheel",
action: "service",
record: {
id: "tour"
}
},
{
id: "modelage",
title: "Hand building",
kind: "Class",
text: "Slabs, coils and pinch pots: clay shaped without a wheel, for the freest pieces.",
image: "https://images.unsplash.com/photo-1422246358533-95dcd3d48961?w=1600&q=80",
alt: "Hands kneading a ball of clay on a wooden table",
action: "service",
record: {
id: "modelage"
}
}
]
}
</script>
<template>
<ServicesTilesHeadingAndTiles v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordswhat the services are ("What the workshop offers") |
| lead | string | Wordsone or two sentences on who they are for |
| services* | Service[] | Datathe services, each with its own picture, in their order (the first leads) |
| allAction | AllAction | the see-all link: its words and the page action it runs |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Service services[] · 8 props
| Prop | Type | Description |
|---|---|---|
| id | string | number | the service’s id |
| title* | string | Wordsthe service, in a few words ("Wheel-throwing class") |
| text | string | Wordswhat it is, in one short sentence |
| image* | string | Picturea picture of this service: the merchant’s own work or premises, never stock presented as theirs |
| alt | string | Wordswhat the picture shows |
| kind | string | Wordswhat sort of service it is ("Course", "Internship", "Made to order") |
| action | string | Actionthe action that opens this service’s page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
AllAction allAction · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("All our services") |
| 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
- Subtle motion: one short reveal; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
services[],allAction
A services section, for home, services, landing, about 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 services blocks
- Offers cards: a few signature services to present with their details and options, rather than a long price list.
- Package cards: equal cards with the points as chips, the words, then the scope as ruled lines aligned across the row (for whom, delay, starting price) and the action: a studio or workshop selling two to four fixed packages, not a subscription; the merchant’s own only.
- Page cover and figures: the page of one service with a strong picture and a few figures to show (a workshop, a studio, a venue): the title over a wide cover, the figures on a card across its foot, then the parts in one centred column, the tools as tiles and the other services as links at the foot; the merchant’s own figures only.
- Page with aside: the page of one service told mostly in words (a craft, a repair, a consultation): the title, lead and parts in a wide column, with the action, the tools and the other services in quiet cards that stay in view beside them; the merchant’s own figures only.
- Price ledger: one row per service, the words left and its delay and price in aligned columns right: services the merchant quotes, compared at a glance; the merchant’s own only.
- Scope cards: cards with label and value rows (duration, delay, price): services the merchant can quantify; the merchant’s own only.
- Scope steps: numbered steps each with its bullets: a service that is delivered in order; the merchant’s own only.
- Split feature: the heading and the picture left, every service as a checklist line in one card right: a short offer shown at once; the merchant’s own only.