Rule
Single / double / section accounting rule lines.
npx shadcn add @lopifi/ruleHow 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.
The accounting rule lines. Two CSS declarations, four centuries of grammar.
<Rule variant="subtotal" /> // border-top: 1px solid --border
<Rule variant="total" /> // border-bottom: 3px double --border-strong
<Rule variant="section" /> // full-bleed 1px --border-subtle
Spans the numeric column only, not the label column. That's what makes it read as accounting instead of a divider. In a multi-period statement it spans each period column independently, with the gutters unruled.
Never combined with a background fill on the same row.
No motion, no interactivity. It's ten lines of code and buys more credibility per byte than anything else in the library.
The accounting it encodes
The concepts this component renders, each defined once in the lexicon.
More in Primitives
See also
Where this component is specified, defined and running.
Elsewhere in the system
The live section Rule renders in, the calculators behind its figures, and the ledger payloads that feed it.
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 Primitives changes
Your copy doesn’t update itself when we fix something here.
- One email when a Primitives component needs a migration
- Nothing when nothing changes
Or install it now