Menu tabs — Services block
Proservices-menu-tabs · for home, landing, service pages
Menu tabs
Many families of services (hair, nails, skin…): one family at a time, so a long list stays short
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-menu-tabsUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import ServicesMenuTabs from '@/components/trame/blocks/services/services-menu-tabs.vue'
const props = {
title: "Our services and prices",
intro: "All prices are in US dollars, tax included. Let us know when you book if your hair is long or thick: we’ll plan the time it needs.",
categories: [
{
id: "coiffure",
name: "Hair",
summary: "Every appointment starts with a consultation on your hair.",
services: [
{
id: "coupe-brushing",
name: "Cut & blow-dry",
description: "Shampoo, tailored cut and styling.",
duration: "1 hr",
price: 5500,
from: true,
options: [
{
label: "Long hair",
price: 1000
},
{
label: "Deep conditioning",
price: 1200,
duration: "+15 min"
}
]
},
{
id: "coupe-courte",
name: "Short cut",
description: "Neat nape and outline, no blow-dry.",
duration: "40 min",
price: 3800
}
]
},
{
id: "ongles",
name: "Nails",
summary: "Polishes without harsh solvents, lasting two to three weeks.",
services: [
{
id: "manucure",
name: "Manicure",
description: "Filing, cuticles, hand care and polish.",
duration: "45 min",
price: 3500
},
{
id: "semi-permanent",
name: "Gel polish application",
duration: "1 hr",
price: 4500,
options: [
{
label: "Nail art, two nails",
price: 600
}
]
}
]
}
],
action: {
label: "Book",
action: "book"
},
options: {
eyebrow: "The salon",
note: "Free cancellation up to 24 hours before your appointment.",
image: "https://images.unsplash.com/photo-1781450090585-1a511b7066d9?w=1600&q=80",
alt: "The salon: chairs in front of arched mirrors"
}
}
</script>
<template>
<ServicesMenuTabs v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe price list’s title ("Our services and prices") |
| intro | string | Wordsa sentence or two on how the salon works: arrival, products, cancellation |
| categories* | Category[] | the merchant’s own services and prices, grouped |
| action | Action | the call to action: its words and the page action it runs |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Category categories[] · 6 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Designthe category’s key |
| name* | string | Wordsthe family of services ("Hairdressing", "Facial care") |
| summary | string | Wordsone sentence on the family |
| image | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordswhat the picture shows |
| services* | Service[] | the services in this category |
Service categories[].services[] · 9 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Designthe service’s id, passed to the book action |
| name* | string | Wordsthe service ("Cut & blow-dry") |
| description | string | Wordswhat it includes, in a sentence |
| duration | string | Wordshow long it takes, as the merchant writes it ("45 min", "1 h 30") |
| price | number | the price, in cents |
| from | boolean | the price is a starting price ("from") |
| priceLabel | string | Wordsa price written in words ("On quote", "Free"); replaces the figure |
| tag | string | Wordsa short mark ("New", "By appointment"), the merchant’s own |
| options | Option[] | the service’s options, e.g. lengths or extras, each with its price |
Option categories[].services[].options[] · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsa choice on the service ("With deep care", "Long hair") |
| price | number | the supplement, in cents, when the option costs more |
| duration | string | Wordsthe extra time ("+15 min") |
Action action · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe book button, repeated on each service ("Book") |
| action* | string | Actionthe page action that books; it receives the service’s id |
Options options · 5 props
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsa small line above the heading |
| note | string | Wordsa line under the list ("Prices incl. VAT. Free cancellation up to 24 h before.") |
| image | string | Picturea picture of the place, shown beside the list |
| alt | string | Wordswhat the picture shows |
| 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 |
| money | formats a price, given in cents |
| 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:
action
A services section, for home, landing, service pages; it uses @lucide/vue, class-variance-authority, clsx, reka-ui, tailwind-merge.
Built with
The components this block is made of; each one installs on its own too.
More services blocks
- Big type rows: one ruled row per service, the name set at display size on the left and its points as small lines in two columns on the right, the action at the foot: four to six services for an agency or a studio that wants a typographic, confident list; the merchant’s own only.
- Cards: cards with a number, the text and a link: three to six services told equally; the merchant’s own only.
- Icon list: two columns of compact rows with an arrow: seven services or more, quickly scanned; the merchant’s own only.
- Lead and list: the main service large on a tinted panel, the others as a numbered list beside it: one flagship service and a few lesser ones; the merchant’s own only.
- 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.