PayslipDocument

A slip shown like a paper document.

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

Issued (placement="page")

Head: company + "Slip gaji · November 2026" + Unduh PDF. Employee strip: Nama · ID, Jabatan · Departemen, Dibayar. Pendapatan | Potongan side by side; deductions with a real minus sign, dark text. Net band in the Gaji tint with the formula; amount in the Figure role. Loading swaps the button to "Menyiapkan…".

PT Mencari Cinta

Slip gaji · November 2026

Nama
Dimas Pratama · MC-014
Jabatan
Backend engineer · Engineering
Dibayar
Rabu, 25 Nov · BCA ••••4521
Pendapatan
Gaji pokokRp 13.100.000
Tunjangan transportRp 500.000
Tunjangan makanRp 400.000
Total pendapatanRp 14.000.000
Potongan
BPJS Kes. & Ketenagakerjaan− Rp 510.863
PPh 21− Rp 980.000
Total potongan− Rp 1.490.863
Gaji bersih diterimaRp 14.000.000 − Rp 1.490.863
Rp 12.509.137

Not issued, error, loading

The paper sheet keeps its frame so the layout never jumps. Never show old numbers under a new month title.

Slip Desember terbit Kamis, 24 Des

Gaji dibayar lebih awal 1 hari karena 25 Des libur Natal.

Motion

Motion: loading → slip plays 14 skeleton reveal. The skeleton sheet pulses, then the real sheet cross-fades in with a 2px cross-blur (400 ms) inside the same tray. Press "Muat ulang". Reduced motion: instant swap.

PT Mencari Cinta

Slip gaji · November 2026

Nama
Dimas Pratama · MC-014
Jabatan
Backend engineer · Engineering
Dibayar
Rabu, 25 Nov · BCA ••••4521
Pendapatan
Gaji pokokRp 13.100.000
Tunjangan transportRp 500.000
Tunjangan makanRp 400.000
Total pendapatanRp 14.000.000
Potongan
BPJS Kes. & Ketenagakerjaan− Rp 510.863
PPh 21− Rp 980.000
Total potongan− Rp 1.490.863
Gaji bersih diterimaRp 14.000.000 − Rp 1.490.863
Rp 12.509.137

When to use

  • Slip gaji saya (employee): the right side of the month list.
  • Admin "Slip November" detail Sheet (placement="sheet"), same document inside the sheet body.
  • The PDF template: the export renders this component.

When not to use

  • Only the net amount (Beranda tile) → StatTile "Slip gaji November".
  • Many employees' pay in one view → Table (Gaji · Periksa total).
  • Changing pay components → admin Sheet form, never this document.

Do and don't

DoShow the sum, so the user can check it"Rp 14.000.000 – Rp 1.490.863" under "Gaji bersih diterima". Older users verify by hand before they call HR.
Don'tRed deductions or a green netDeductions are normal, not errors. The net band uses the Gaji module tint, not success green. Short forms like "Rp 12,5 jt" never appear on the slip.

Installation

Add PayslipDocument 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/payslip-document.json

API

import { PayslipDocument } from "@/components/mahr/payslip-document"
PropTypeDefaultDescription
placement"page" | "sheet""page"sheet: one column, no tray, no shadow, no head button (download goes to the Sheet footer).
slip{ period, company, employee, paid, earnings[], deductions[], totalEarnings, totalDeductions, net }–Totals and net come from the server; the component never sums.
status"issued" | "not-issued" | "loading" | "error""issued"not-issued needs month + issueDate ("Desember", "Kamis, 24 Des").
onDownload · downloading() => void · boolean– · falsedownloading swaps the button to "Menyiapkan…"; width stays.
onRetry() => void–error state "Coba lagi".