JournalEntry
Debit and credit as two columns. No signed-column variant.
npx shadcn add @lopifi/journal-entryExamples
The same component, case by case. Each stage is the shipped code with the props it shows; switch to Code for the usage.
Posted
A posted entry offers Reverse and nothing else: no edit, and the delete action is absent, not disabled.
Draft, out of balance
A draft can still be edited, and a transposed figure shows as the exact difference that stops it posting.
Reversed
The original stays in the ledger exactly as posted, now pointing at the entry that reversed it, with no actions left to take.
The reversing entry
Same accounts, sides swapped, dated the first day of the next period, and linked back to the entry it reverses.
Zero-decimal currency
A Japanese entity's entry renders in whole yen, with no invented decimals, across three lines.
How it behaves
What it renders, what it refuses to render, and why. The same paragraphs as the family spec, so the two can’t disagree.
Debit and credit as two columns. There is no single-signed-column variant.
JE-2026-0841 · 30 Sep 2026 · Adjusting · Posted [Reverse] [Audit trail]
Accrue September professional fees
Account Dept Debit Credit
6410 · Professional fees G&A 12,000.00
2150 · Accrued liabilities 12,000.00
───────── ─────────
12,000.00 12,000.00 ✓ balanced
⟲ Reverses 1 Oct 2026 · Evidence: Baker & Co engagement letter.pdf
Layer 4: 3 sizes (title-md header · body labels · figure-sm amounts), 2 weights. tnum + case on both amount columns; the columns are independently right-aligned and each hugs its own gutter.
Rules: balance check always visible · unbalanced is a prominent error with the difference stated · source and status on the header · no delete action on a posted entry — absent, not disabled · reversal linked bidirectionally, both entries remain visible · evidence inline.
Motion: none. Server-safe (no "use client") — a 400-line entry renders on the server.
The accounting it encodes
The concepts this component renders, each defined once in the lexicon.
More in Accounting core (GL)
See also
Where this component is specified, defined and running.
Elsewhere in the system
The live section JournalEntry renders in, the calculators behind its figures, and the ledger payloads that feed it.
- JournalEntry, runningThe gl showcase — live, with theme, density, grayscale and reduced-motion switches.
- Journal entry balancerPaste an entry, see what it's out by, and copy the lines back out.
- Journals and the general ledgerCan you get the actual general ledger out?
- Accounting core (GL)The general ledger layer. Specs for 18 React components: JournalEntry, JournalEntryForm, JournalEntryTable, AccountPicker and 14 more.
Components are copied into your repository and meant to be edited. Rounding policy, fiscal calendar and compliance copy differ per company.
Release notes
Get an email when Accounting core (GL) changes
Your copy doesn’t update itself when we fix something here.
- One email when a Accounting core (GL) component needs a migration
- Nothing when nothing changes
Or install it now