Directory location cards — Team block
Proteam-directory-location-cards · for about, team pages
Directory location cards
The places with their head count, then compact cards (avatar, name, role, a pinned line with where the person works) in sections by team: a team spread over several cities, where the place each person works from matters; 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/team-directory-location-cardsUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import TeamDirectoryLocationCards from '@/components/trame/blocks/team/team-directory-location-cards.vue'
const props = {
title: "The people behind the workshop",
lead: "A small team under one roof: the people who design, sew and ship your orders.",
people: [
{
id: 1,
name: "Camille Laurent",
role: "Founder, leatherworker",
group: "Workshop",
location: "Portland",
bio: "Designs the models and cuts the first prototypes. She opened the workshop with one workbench and a sewing machine.",
avatar: "https://images.unsplash.com/photo-1573496359142-b8d87734a5a2?w=1600&q=80"
},
{
id: 2,
name: "Mathieu Roche",
role: "Production manager",
group: "Workshop",
location: "Portland",
bio: "Follows every batch from cutting to final inspection and decides when a piece is ready to ship.",
avatar: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=1600&q=80"
}
],
cta: {
label: "See open positions",
action: "careers"
}
}
</script>
<template>
<TeamDirectoryLocationCards v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordswhat the page says about the people ("The people behind the workshop") |
| lead | string | Wordsone sentence on how the team works |
| people* | People[] | Datathe real people of the team, with their consent |
| cta | Cta | 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 |
People people[] · 9 props
| Prop | Type | Description |
|---|---|---|
| id | string | number | Datathe record’s id in the tool that answers it |
| name* | string | Wordsthe person’s name |
| role | string | Wordstheir role or job title |
| company | string | Wordswhere they work |
| avatar | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| url | string | Designa page about them |
| bio | string | Wordsone or two sentences, written or approved by the person |
| group | string | Wordstheir team or department ("Workshop", "Shop") |
| location | string | Wordswhere they work ("Lyon") |
Cta cta · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("See the open positions") |
| 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:
cta - Reads
peoplefrom your app
A team section, for about, team pages; it uses @lucide/vue, @vueuse/core, 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 team blocks
- Founders cards: one to three large cards with a big portrait and a bio: the founders or owners; the merchant’s own only.
- Lead and crew: the first person large with their bio, everyone else as a compact list beside: a studio led by one person with a small crew; the merchant’s own only.
- Leadership rows: avatar, name, role and a few sentences per hairline row: three to six people to introduce properly; the merchant’s own only.
- Portrait carousel: portrait cards (picture, name, role, a short bio) in one row that steps by arrows, the next card peeking, a counter beside the title: six to twelve people in a section that must stay short; the merchant’s own only.
- Portrait grid: portraits in a grid sized to the count, name and role under each: three to twelve people with pictures; the merchant’s own only.
- Practitioner list cards: portrait cards in a grid with speciality chips and a booking button: three to twelve practitioners a visitor compares at a glance.
- Practitioner list directory: a compact list grouped by profession, small portrait, one line of detail and a booking link per row: a large practice with several professions.
- Practitioner list spotlight: one large portrait per practitioner in alternating rows with the details beside it: one to four people the practice wants to introduce properly.