SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

Finance foundations

What @sdxc/ui/finance is for, the money rules its parts share, and every variable it reads.

The pieces of a banking, budgeting or wallet screen: a statement grouped by day with each day's total, and a drawn payment card that can be frozen.

They draw what the server hands them. Amounts come in as integer minor units and are written by the root `Amount`, so a figure is never a float.

typescript
import "@sdxc/ui/theme.css";
import { … } from "@sdxc/ui/finance";

When to reach for it

  • A bank or card statement, a wallet's history or a billing log that reads by day.
  • A cards screen where a card is shown, frozen or picked.
  • Any list of money in and out where the incoming side should read at a glance.

Shared ideas

  • Minor units in, text outPass cents and an ISO code to Amount; @sdxc/money parses, splits and converts them.
  • A statement's signsign="ledger" marks money in with a plus and the success tone, and money out as a plain figure.
  • Rows are linksWith href, a Ledger.Entry is one link, so the record opens beside the list from its address.
  • Masked numbers onlyPaymentCard takes the last four digits and draws the rest as dots, so a full number is never passed.
  • State in the nameA frozen card frosts over and its accessible name says frozen.

CSS variables

Every custom property the namespace reads or declares, with its default and what it controls.

Reads the neutral role for text, hairlines and the day headings, brand for the open row and the card face, and success for money in. The roles are documented on Theming.

Ledger

VariableDefaultWhat it controls
--ui-ledger-bgvar(--ui-bg)The sticky day heading's background; set it to the surface the ledger sits on.
--ui-ledger-sticky-top0pxWhere the day heading sticks, below a sticky toolbar.
--ui-ledger-inset0.75remThe inline padding of the heading and every row.

PaymentCard

VariableDefaultWhat it controls
--ui-payment-card-bgthe tone's gradientThe face's paint, for a card in an issuer's own colours.
--ui-payment-card-radius1remThe card's corners.
--ui-payment-card-max26remThe widest the card grows.
@sdxc/ui

Can’t find it? Contact us