Sectors expand panels — Features block
Profeatures-sectors-expand-panels · for landing, about, home pages
Sectors expand panels
Tall panels side by side, the open one widens to show its sentence, link and picture: 3 to 6 sectors with good pictures, the section’s bold moment; the sectors the merchant really serves 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-sectors-expand-panelsUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import FeaturesSectorsExpandPanels from '@/components/trame/blocks/features/features-sectors-expand-panels.vue'
const props = {
title: "The spaces we fit out",
lead: "Our workshop designs and builds furniture for places that welcome people. Every sector has its constraints, and we know them.",
sectors: [
{
name: "Restaurants and cafes",
text: "Banquettes, counters and wall paneling designed for service, wiped clean in seconds and built to last ten years.",
icon: "restaurant",
image: "https://images.unsplash.com/photo-1785317177998-a7949db59548?w=1200&q=80",
alt: "Set tables and light leather armchairs in a restaurant dining room",
action: "sector.open",
record: {
id: "restaurants"
}
},
{
name: "Stores",
text: "Custom clothing racks, display cases and checkout counters that leave room for the products and come apart when the season changes.",
icon: "store",
image: "https://images.unsplash.com/photo-1445205170230-053b83016050?w=1200&q=80",
alt: "A rack of warm-toned clothes in a well-lit shop",
action: "sector.open",
record: {
id: "boutiques"
}
}
],
linkLabel: "See our work"
}
</script>
<template>
<FeaturesSectorsExpandPanels v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe section title ("The trades we equip") |
| lead | string | Wordsone or two sentences under the title |
| sectors* | Sector[] | the sectors the business really serves |
| linkLabel | string | Wordsthe words of each sector’s link ("See our work") |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Sector sectors[] · 7 props
| Prop | Type | Description |
|---|---|---|
| name* | string | Wordsthe sector, in a few words ("Restaurants and cafés") |
| text* | string | Wordsone sentence on what the business does for it |
| icon | string | Designan icon name: bakery, restaurant, store, hotel, salon, library, home, office, health, school, industry, logistics, farm, public, services, craft |
| image | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordswhat the picture shows |
| action | string | Actionopens the sector’s 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:
sectors[]
A features section, for landing, about, home pages; it uses @lucide/vue.
More features blocks
- Object specs rail: one object with measurable specs: a rail of real values beside its picture, marked parts explained one at a time.
- Object tiles burst: two to six benefits, each an object cut out of its photo bursting from the top of its own solid square tile, words under it: a studio, a club or a maker whose offer is easiest to see as things.
- Object tiles shelf: the same objects standing on one long solid band that runs the width of the page, crossing its top edge, the words under each: a calmer, wider line for three to six items (on a phone, a list of small tiles beside their words).
- Rows alternating: rows that alternate words and a live mini-interface from side to side: 2 to 4 features of equal weight read down the page; figures, quotes and messages are the merchant’s own only.
- Rows sticky rail: a sticky menu of the features beside rows that scroll past it, the current one lit: 4 to 6 features a visitor may jump between; figures, quotes and messages are the merchant’s own only.
- Split accordion: 3 to 5 capabilities that share one picture area, the open one decides the picture: a single screen told in parts.
- Split tabs: workflows that look different from one another, a tab bar over one big framed picture: pick a view, see it.
- Split visual plus stats: one capability with its picture and a band of figures the merchant measured: proof next to the promise.