Project card member — Dashboard block
Prodashboard-project-card-member · for app pages
Project card member
A person-led summary with counters and contact entry, using the merchant's own records 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/dashboard-project-card-memberUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import DashboardProjectCardMember from '@/components/trame/blocks/dashboard/dashboard-project-card-member.vue'
const props = {
title: "The project at a glance",
record: {
id: "carnet",
title: "The materials notebook",
description: "A shared space to document the workshop’s trials.",
figure: {
label: "Phase",
value: "Preparation"
},
progress: 0,
person: {
name: "Camille Morel",
role: "Workshop coordinator"
},
team: [
{
name: "Camille Morel"
},
{
name: "Lou Perrin"
}
]
},
open: "project"
}
</script>
<template>
<DashboardProjectCardMember v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe section’s heading |
| record* | Record | null | Datathe record the action applies to, passed to the host with it, if any |
| open | string | Actiona named action of the page |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Record record · 11 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Datathe record’s id |
| title* | string | Wordsthe record’s title |
| client | string | Wordsthe client |
| description | string | Wordsthe record’s description |
| figure* | Figure | the key figure, a label and a value |
| progress* | number | how far along it is, 0 to 100 |
| person | Person | the person in charge |
| team | Team[] | Datathe people on it |
| status | string | Wordsthe record’s status, in the host’s words |
| dates | Date[] | key dates, each a label and a value |
| counters | Counter[] | counts shown on the card, each a label and a number |
Figure record.figure · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat the value is about |
| value* | string | Wordsthe value, as the merchant states it |
Person record.person · 6 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 |
Team record.team[] · 6 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 |
Date record.dates[] · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat the value is about |
| value* | string | Wordsthe value, as the merchant states it |
Counter record.counters[] · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat the figure is |
| value* | number | the count |
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
- No motion; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
open - Reads
recordsfrom your app
A dashboard section, for app pages.
More dashboard blocks
- Leaderboard podium: a team page or a monthly review where the top three matter: three raised tiles, the first in the middle, the rest as rows under them.
- Leaderboard ranked rows: a dashboard card of 3 to 10 entries: rank, avatar, name, the value right-aligned and its signed change.
- Leaderboard table: a long ranking of 12 or more to scan and compare: rank, name, value, change and share columns, the viewer’s own row pinned when outside the top ten.
- Metric tabs: one big chart for several measures: the chart and every figure with its own points become selectable tiles over a single plot, the other figures a quiet strip and the lists two columns under it.
- Overview: an app’s home read from the top: the figures, then the chart, then the lists side by side.
- Report breakdown: The merchant’s own breakdown table leads beside a written reading, with charts as supporting evidence below.
- Report comparison: The merchant’s own current and previous figures are compared in a ledger above two aligned charts.
- Report summary: A document-like overview of the merchant’s own period figures, followed by charts and the detailed breakdown.