ProfileCard

Photo, name, job facts, manager.

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

Variants and loading

employee: relation "Atasan" (none at the top of the chart) + footer "Lihat profil saya". manager: "Bawahan langsung · N orang" as an avatar row (max 5 + "+N", 4px gap) + "Lihat tim di Organisasi". header: full width, avatar 56 (closed Avatar size set), ID chip, 4 facts, completeness, no footer. Only the footer row reacts.

Dimas Pratama

Backend engineer · Engineering

Atasan
Indra WijayaEngineering manager
Lihat profil saya

Indra Wijaya

Engineering manager · Engineering

Bawahan langsung · 9 orang
+4
Lihat tim di Organisasi

Dimas Pratama

MC-014

Backend engineer · Engineering

Data Anda lengkap

Tidak ada yang perlu diisi.

Bergabung
4 Jan 2024
Masa kerja
2 tahun
Tipe
Tetap · tanpa tanggal akhir
Lokasi kerja
Jakarta

Record header (admin)

header on Karyawan · Detail. status = ONE Badge at the right ("Sedang cuti · sampai 18 Des", "Diarsipkan"); not together with completeness. notice = a tinted strip under the facts (tone danger / warning / neutral): icon 22, a dark title, one muted line and ONE Button: primary when it is the page's next step ("Lengkapi rekening"), secondary otherwise ("Pulihkan"). Every fact value has a 28 slot, so a Badge value ("Rekening kosong") gives the same strip height as text. The notice is a data status: it appears and goes away with the data (the page grows by 72).

Galih Ramadhan

MC-047

Sales associate · Sales & marketing

Bergabung
17 Nov 2026
Masa kerja
kurang dari 1 bulan
Tipe
Percobaan · sampai 17 Feb 2027
Data gaji
Rekening kosong

Sinta Maharani

MC-035

Staf keuangan · Finance

Diarsipkan
Bergabung
6 Feb 2023
Masa kerja
3 tahun 7 bulan
Keluar
30 Sep 2026
Data gaji
Tidak ikut gaji

Diarsipkan sejak 30 Sep 2026 · Mengundurkan diri

Sinta tidak ikut gaji dan tidak bisa login. Data tetap tersimpan.

Motion

Motion: loading → card plays 14 skeleton reveal. The skeleton card pulses, then the real card cross-fades in with a 2px cross-blur (400 ms). The footer row hover uses --duration-quick. Press "Muat ulang". Reduced motion: instant swap.

Dimas Pratama

Backend engineer · Engineering

Atasan
Indra WijayaEngineering manager
Lihat profil saya

When to use

  • The left column of Beranda (employee and manager).
  • The top of Profil saya (variant="header"), with the completeness block.
  • The top of an admin record page (variant="header", Karyawan · Detail), with a status Badge and, when the record needs a step, a notice strip.
  • Exactly one ProfileCard per screen: the signed-in person, or the one record of a detail page.

When not to use

  • Another person in a list or grid → PersonCard.
  • Label/value data that can be edited → DetailCard.
  • The HR person to contact → ContactCard.
  • A person inside a table row → Table person cell (Avatar 40 + 2 lines).

Do and don't

DoOne relation, one way outDimas sees his Atasan and one nav row "Lihat profil saya". Contact details for HR live in the ContactCard below it.
Don'tEdit buttons or salary on the profile cardEditing happens in DetailCard on Profil saya. A blue "Lihat profil" link is wrong: navigation is dark text + grey chevron.

Installation

Add ProfileCard 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/profile-card.json

API

import { ProfileCard } from "@/components/mahr/profile-card"
PropTypeDefaultDescription
variant"employee" | "manager" | "header""employee"Closed set.
person{ name, photoUrl?, jabatan, departemen, employeeNo? }–employeeNo shows only in variant="header" (ID chip).
manager{ name, photoUrl?, jabatan } | nullnullemployee variant. null → no relation block.
reports{ name, photoUrl? }[][]manager variant. First 5 as avatars, then "+N".
facts · completeness{ label, value }[] · { complete, missing? }–header variant only. Incomplete → warning block "N data belum diisi". Fact values sit in a 28 slot. While loading, pass the fact labels: the skeleton keeps the strip.
statusReactNode (one Badge)–header variant, record pages. Shown at the right instead of completeness.
notice{ tone: "danger" | "warning" | "neutral"; title; description?; action? } | nullnullheader variant. A strip under the facts with ONE Button (primary only when it is the page's next step).
footerHref · footerRenderstring · ReactElement–Footer label is fixed per variant. render={<Link href=… />} for your router.
loadingbooleanfalseSkeleton at real sizes; no fake name.
error · onRetryboolean · () => voidfalseFailed load: "Gagal dimuat." + secondary "Coba lagi" inside the card, at the skeleton's height (shared LoadError pattern).