JournalEntryForm
Line grid with live balance check and dimension capture.
npx shadcn add @lopifi/journal-entry-formExamples
The same component, case by case. Each stage is the shipped code with the props it shows; switch to Code for the usage.
Posting
Return a promise from onPost and the button holds at Posting… until the ledger confirms, so nobody posts twice.
Closed period
Date the entry on or before 30 Sep 2026 and the cutoff warning explains the close and offers its two remedies instead of a bare rejection.
Zero-decimal currency
In JPY the amount fields and totals take whole yen; type 1840000 and the totals read ¥1,840,000, never ¥18,400.00.
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.
Line grid with account, dimensions, debit, credit, memo. Running balance check updates live at the bottom. Tab moves across the row, Enter adds a line, and the amount fields follow AmountInput rules. Reads requiredDimensions from the account the moment it's picked and adds those fields inline. Blocks posting into a closed period with the cutoff explanation, not a bare rejection. Opens prefilled from defaultLines, defaultDate and defaultDescription (a template, a reversal, a resumed draft); fewer than two lines are padded, because an entry has two sides.
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 JournalEntryForm renders in, the calculators behind its figures, and the ledger payloads that feed it.
- JournalEntryForm, 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.
- 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