Profile card portrait — Team block
Proteam-profile-card-portrait · for about, product, app, landing pages
Profile card portrait
A person whose face is the argument (a coach, an artist): the picture fills the top of the card, name, figures and the main action on a solid foot
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-profile-card-portraitUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import TeamProfileCardPortrait from '@/components/trame/blocks/team/team-profile-card-portrait.vue'
const props = {
name: "Elise Garnier",
avatar: "https://images.unsplash.com/photo-1580489944761-15a19d654956?w=800&q=80",
alt: "Portrait of a smiling woman with brown hair in a bun, wearing a white T-shirt",
cover: "https://images.unsplash.com/photo-1676125105332-608345abe20e?w=1400&q=80",
headline: "Ceramicist, founder of the studio",
verified: true,
bio: "I throw every bowl and cup in the shop in my Pearl District studio, and glaze everything on site.",
facts: [
{
label: "Location",
value: "Portland, Pearl District"
},
{
label: "Since",
value: "Studio opened in 2014"
}
],
counters: [
{
label: "pieces in the shop",
value: "48"
},
{
label: "classes a month",
value: "6"
}
],
tags: [
"Stoneware",
"Throwing"
],
links: [
{
label: "Studio journal",
action: "journal"
},
{
label: "Instagram",
url: "https://example.com/atelier-garnier"
}
],
actions: [
{
label: "Book a class",
action: "booking"
},
{
label: "Write",
action: "contact"
}
]
}
</script>
<template>
<TeamProfileCardPortrait v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| name* | string | Wordsthe person’s name |
| avatar | string | Picturetheir portrait |
| alt | string | Wordswhat the portrait shows |
| cover | string | Picturea cover picture: the place, the work |
| headline | string | Wordsrole and place ("Ceramicist in Lyon") |
| verified | boolean | only when the host or the platform says so |
| bio | string | Wordsa few lines about the person |
| facts | Fact[] | location, since when, rate: the merchant’s own words |
| counters | Counter[] | 2 to 4 figures the merchant or the platform gives, never made up |
| tags | string[] | Wordsa skill or a speciality |
| links | Link[] | their profiles and site |
| actions | Action[] | one or two ways to reach them ("Write", "Book"), the first is the main one |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Fact facts[] · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat the value is about |
| value* | string | Wordsthe value, as the merchant states it |
Counter counters[] · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat the value is about |
| value* | string | Wordsthe value, as the merchant states it |
Link links[] · 4 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe link’s words, e.g. "See the collection" |
| action | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action applies to, passed to the host with it, if any |
| url | string | Designan address outside the app |
Action actions[] · 4 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe link’s words, e.g. "See the collection" |
| action | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action applies to, passed to the host with it, if any |
| url | string | Designan address outside the app |
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:
links[],actions[]
A team section, for about, product, app, landing 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 team blocks
- 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.
- Side mosaic: the title, the lead and the link in the left third, a tight mosaic of portraits on the right with name and role on each picture’s foot: four to six people on a team page where the words lead and the faces support; the merchant’s own only.
- Speakers keynote plus: the keynote speakers large, the others in a compact grid: a line-up with a clear hierarchy.
- Speakers portrait circles: round portraits in balanced rows with name, role and company: a line-up of three to twelve people.
- Speakers solid backdrops: arch portraits standing on flat colour tiles with the name beneath: a lively or youthful event.