PersonCard
A teammate: avatar, name, job title.
$ npx shadcn@latest add https://mahrdesign.faizintifada.com/r/person-card.jsonManager block and team grid
Indra WijayaAtasan Anda · Engineering manager
Andi SaputraFrontend engineer
Bayu KurniawanMobile engineer
Dewi LestariUI designer
Dimas PratamaBackend engineer
Fajar NugrohoQA engineer
Raden Kusumawardhani PutriFinance staff
Motion
Andi SaputraFrontend engineer
Dewi LestariUI designer
Dimas PratamaBackend engineer
When to use
- Organisasi (employee view): "Rekan satu tim", 3 columns.
- The ONE manager block ("Atasan Anda") at the top of Organisasi (variant="manager"), with Email / Telepon rows. Never a second manager card on the same page.
- Small teams (≤ 12 people). Bigger groups → a list.
When not to use
- The signed-in person's own summary → ProfileCard.
- Many employees with columns (ID, departemen, status) → Table person rows.
- Who reports to whom across departments → Bagan (admin Organisasi).
- The HR contact with WhatsApp / Email buttons → ContactCard.
Do and don't
Sort by name, keep "Anda" in placeTeammates A–Z; Dimas stays in alphabetical order with the grey "Anda" card, so the order means the same for everyone.
Salary, status or a colour per personNo gaji, no "Cuti" badges, no coloured initials. Leave status belongs to the manager's "Tim saya".
Installation
Add PersonCard with the shadcn CLI (your project needs a components.json and the MaHR theme: https://mahrdesign.faizintifada.com/r/theme.json), or copy the files by hand.
API
import { PersonCard, PersonGrid } from "@/components/mahr/person-card"| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "self" | "manager" | "default" | self = signed-in person (one per grid). |
person | { name, photoUrl?, jabatan } | – | No ID, no salary, no status. |
email · phone | string? | – | manager variant only: 56 px mailto: / tel: rows. Missing ones are left out. |
module · loading · className | ModuleId · boolean · string | "organisasi" · false | className = layout only. |
error · onRetry | boolean · () => void | false | Failed load: "Gagal dimuat." + secondary "Coba lagi" in one row at the card's height (shared LoadError pattern). |
<PersonGrid> columns | 2 | 3 | 3 | Wrapper: equal columns, gap 16. Pass people sorted A–Z. |