Page with aside — Services block

Free

services-page-with-aside · for service pages

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

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-page-with-aside

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import ServicesPageWithAside from '@/components/trame/blocks/services/services-page-with-aside.vue'

const props = {
title: "Alterations and repairs",
lead: "Pants that are too long, a torn lining, a jacket that sits badly on the shoulders: we rework your clothes by hand or by machine, so you can keep them longer.",
icon: "scissors",
cover: "https://images.unsplash.com/photo-1586216583179-20b23ef9dd5f?w=1600&q=80",
alt: "Hands sewing a piece of black fabric with a needle over a wooden table, next to a pair of scissors and a tape measure",
sections: [
{
heading: "The fitting at the workshop",
text: "Everything starts with a fitting: we pin the alteration on you, in front of the mirror, and we note together what needs to change.\n\nYou leave with a ticket and a pickup date; the price is set before we touch the garment."
},
{
heading: "What we alter",
text: "Most alterations take a week. Delicate pieces, like silk or leather, sometimes need one more fitting.",
points: [
"Hems on pants, skirts and sleeves",
"Waists taken in or let out"
]
}
],
includes: [
"The fitting and pinning",
"The price quoted before the work"
],
tools: [
{
name: "Lockstitch machine",
text: "For straight seams and invisible hems"
},
{
name: "Serger",
text: "For clean edges that won’t fray in the wash"
}
],
figures: [
{
value: "48 hrs",
label: "for a simple hem"
},
{
value: "12 years",
label: "at our Thibaudiere Street workshop"
}
],
related: [
{
title: "Made-to-measure",
text: "A piece designed and sewn for you",
action: "service",
record: {
id: "sur-mesure"
}
},
{
title: "Sewing classes",
text: "Saturday mornings, four students at most",
action: "service",
record: {
id: "cours"
}
}
],
cta: {
label: "Book a fitting",
action: "booking"
},
options: {
eyebrow: "Sewing workshop, Portland"
}
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe service’s name ("Alterations and repairs")
lead*stringWordswhat it is and for whom, in one or two sentences
iconstringDesignan icon for the service: scissors, ruler, hammer, wrench, brush, sparkles, leaf, truck, shield, heart, camera, home
coverstringPicturea picture of the service being done or of its result
altstringWordswhat the cover shows
sections*Section[]Datahow the service is done, part by part, in reading order
includesstring[]Datawhat the price or the booking includes, the merchant’s own
toolsTool[]Datathe tools and materials used, the merchant’s own; a mark only when supplied
figuresFigure[]Datatwo to four figures, the merchant’s own only
relatedRelated[]Datathe merchant’s other services
ctaCtathe call to action: its words and the page action it runs
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Section sections[] · 3 props
PropTypeDescription
heading*stringWordsthe part’s heading ("How an alteration works")
text*stringWordswhat happens in this part; a blank line starts a new paragraph
pointsstring[]Wordsone point of a short list
Tool tools[] · 3 props
PropTypeDescription
name*stringWordsa tool, machine or material the service uses ("Overlocker", "Waxed linen thread")
textstringWordsone line on what it is for
imagestringPicturea picture or mark of it, only one the merchant supplied and may show
Figure figures[] · 2 props
PropTypeDescription
value*stringWordsthe merchant’s own figure, as written ("48 h", "12 years")
label*stringWordswhat it counts ("for a hem")
Related related[] · 4 props
PropTypeDescription
title*stringWordsanother service of the merchant
textstringWordsone line on it
action*stringActionthe action that opens it
recordRecord<string, unknown>Datathe record the action opens, if any
Cta cta · 3 props
PropTypeDescription
label*stringWordswhat happens ("Ask for a quote", "Book an appointment")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
Options options · 2 props
PropTypeDescription
eyebrowstringWordswhat kind of service it is ("Workshop", "At home")
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
  • Subtle motion: one short reveal; still under reduced motion
  • Real buttons and links, a visible focus
  • Asks your app through actions: related[], cta

A services section, for service 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

  • Menu list: a salon’s or spa’s whole price list read like a menu, with leaders from name to price: the full list in view.
  • Menu tabs: many families of services (hair, nails, skin…): one family at a time, so a long list stays short.
  • 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.
  • 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.

All 19 services blocks