PersonCard

A teammate: avatar, name, job title.

$ npx shadcn@latest add https://mahrdesign.faizintifada.com/r/person-card.json

Manager block and team grid

default · self (the signed-in person: grey fill and a neutral "Anda" badge, no hue; exactly one per grid) · manager (full width, avatar 96, "Atasan Anda · jabatan" under the name (no eyebrow), then Email / Telepon as 56 px contact rows: module icon tile, label, value, hover colour only; Avatar sizes are a closed set 24/32/40/44/56/96). View-only: no hover, no click. Long names: one line + "…", full name as a tooltip. Loading: skeleton cards.

Indra WijayaAtasan Anda · Engineering manager
Emailindra@perusahaan.idTelepon0811 9021 3344
Andi SaputraFrontend engineer
Bayu KurniawanMobile engineer
Dewi LestariUI designer
Dimas PratamaBackend engineer
Anda
Fajar NugrohoQA engineer
Raden Kusumawardhani PutriFinance staff

Motion

Motion: loading → cards play 14 skeleton reveal. Each skeleton card pulses, then the real card cross-fades in with a 2px cross-blur (400 ms) in the same grid cell, so the grid does not jump. Press "Muat ulang". Reduced motion: instant swap.

Andi SaputraFrontend engineer
Dewi LestariUI designer
Dimas PratamaBackend engineer
Anda

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

DoSort 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.
Don'tSalary, 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.

terminal
bunx --bun shadcn@latest add https://mahrdesign.faizintifada.com/r/person-card.json

API

import { PersonCard, PersonGrid } from "@/components/mahr/person-card"
PropTypeDefaultDescription
variant"default" | "self" | "manager""default"self = signed-in person (one per grid).
person{ name, photoUrl?, jabatan }–No ID, no salary, no status.
email · phonestring?–manager variant only: 56 px mailto: / tel: rows. Missing ones are left out.
module · loading · classNameModuleId · boolean · string"organisasi" · falseclassName = layout only.
error · onRetryboolean · () => voidfalseFailed load: "Gagal dimuat." + secondary "Coba lagi" in one row at the card's height (shared LoadError pattern).
<PersonGrid> columns2 | 33Wrapper: equal columns, gap 16. Pass people sorted A–Z.