Teams table — Workspace block

Pro

workspace-teams-table · for app, settings pages

Teams table

An organisation with 5 to 30 teams to compare: one row each with key, focus, members, open work, response time and last activity

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/workspace-teams-table

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import WorkspaceTeamsTable from '@/components/trame/blocks/workspace/workspace-teams-table.vue'

const props = {
title: "The workshop’s teams",
subtitle: "Who handles what, and what’s waiting",
teams: [
{
id: "sav",
name: "Customer service",
key: "SAV",
tone: "info",
focus: "Questions, conversations and returns",
members: [
{
name: "Sophie Marchand",
role: "Advisor",
avatar: "https://images.unsplash.com/photo-1573496359142-b8d87734a5a2?w=160&q=80"
},
{
name: "Karim Benali",
role: "Advisor"
}
],
memberCount: 5,
openWork: 13,
response: "8 hrs",
projects: [
{
id: "faq",
label: "New online help center"
},
{
id: "ret",
label: "Simpler returns"
}
],
updated: "2 hours ago"
},
{
id: "log",
name: "Shipping",
key: "EXP",
tone: "warning",
focus: "Packing and sending parcels",
members: [
{
name: "Theo Rousseau",
role: "Packer",
avatar: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=160&q=80"
},
{
name: "Nadia Chevalier",
role: "Packer"
}
],
openWork: 9,
response: "24 hrs",
projects: [
{
id: "emb",
label: "Plastic-free packaging"
}
],
updated: "20 min ago"
}
],
focuses: [
{
label: "All",
count: 6,
active: true,
action: "teams.filter",
record: {
focus: "all"
}
},
{
label: "Customers",
count: 3,
action: "teams.filter",
record: {
focus: "clients"
}
}
],
selected: "sav",
create: {
label: "Create a team",
action: "team.create"
},
open: "team.open"
}
</script>

<template>
<WorkspaceTeamsTable v-bind="props" />
</template>

Props

Each prop says who changes it: Words, Picture, Action, Design, Data.* required.

PropTypeDescription
title*stringWordsthe page’s heading ("Teams")
subtitlestringWordsone line under the title
teams*Team[]Datathe organisation’s own teams
focusesFocuse[]filter chips by focus: links the host answers
selectedstring | numberDatathe team shown open (list-detail) or marked (the others)
createCreate"Create a team"
openstringActionthe page of one team (record: the team)
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Team teams[] · 11 props
PropTypeDescription
id*string | numberDatathe record’s id
name*stringWordsthe team’s name ("Customer service")
keystringWordsa short key ("After-sales")
tone'brand' | 'info' | 'success' | 'warning' | 'neutral'the team’s colour key, from the theme
focusstringWordswhat the team looks after ("Deliveries and returns")
members*Member[]the people, the leads first
memberCountnumberhow many people, when `members` holds only the first ones
openWorknumberopen requests or tasks, as the host counts them
responsestringWordsthe response time the team keeps, as the host writes it ("8 h")
projectsProject[]what the team works on now
updatedstringWordsthe last activity, as the host writes it ("2 h ago")
Member teams[].members[] · 6 props
PropTypeDescription
idstring | numberDatathe record’s id in the tool that answers it
name*stringWordsthe person’s name
rolestringWordsthe person’s role in the team
companystringWordswhere they work
avatarstringPicturea picture: a root-relative path (/media/…) or an absolute URL
urlstringDesigna page about them
Project teams[].projects[] · 2 props
PropTypeDescription
id*string | numberDatathe record’s id
label*stringWordsthe project’s name, as shown
Focuse focuses[] · 5 props
PropTypeDescription
label*stringWordsthe link’s words, e.g. "Unpaid"
countnumberDatahow many records it holds, as the host counted them
activebooleantrue: this is the one shown now
action*stringActionthe page action that shows it
recordRecord<string, unknown>Datawhat the action needs (the filter’s value)
Create create · 2 props
PropTypeDescription
label*stringWordsthe words on the button or link
action*stringActiona named action of the page
Options options · 1 props
PropTypeDescription
mood'inverse' | 'brand' | 'warm' | 'tint' | stringa 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).

MemberWhat it is for
hrefthe address an action leads to, or null to hide what leads there
actruns a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error }
canwhether the page has this action
asseta picture’s address as your app serves it
Linkyour router’s link component
cartCountthe cart badge’s number
cartDrawerwhether your app has a cart drawer
cartOpenwhether the cart drawer is open
labelyour 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:

KeyEnglishFrench
newsletter.alreadyYou are already subscribed.Vous êtes déjà inscrit.
newsletter.doneDone: you are subscribed.C’est noté : vous êtes inscrit.
newsletter.invalidCheck the email address.Vérifiez l’adresse e-mail.
newsletter.tooManyToo 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: focuses[], create, open
  • Reads teams from your app

A workspace section, for app, settings 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 workspace blocks

  • Permission matrix role cards: Role summaries opening their resource controls, the merchant's own grants only.
  • Permission matrix: A resource-by-role matrix of labelled grants, the merchant's own permissions only.
  • Team invitations split: A roster beside an invitation form when growing a team; roles and invitations are the organisation’s own only.
  • Team members cards: A people-first directory with role footers and a separate invitation queue, using the organisation’s own members only.
  • Team members panel: The members section of a settings page, in a column about 600 px wide, for 2 to 20 people: role counts, tabs for members and invitations, compact rows; the organisation’s own members only.
  • Team members table: A roster comparing people, roles and invitation states, using the organisation’s own members only.
  • Team presence by team: a larger organisation: one folding group per team with its count and compact rows with each person’s status in words; someone in two teams appears in both; the app’s own statuses only.
  • Team presence columns: a small team, up to about 20 people: three columns (available, away, offline) with their counts, so one sees at a glance whom to reach; the app’s own statuses only.

All 13 workspace blocks