โ๏ธ UI Atoms
Small, standalone UI primitives, input helpers and display blocks, in lib/components/ui/ and its
input/, date/ and display/ subfolders.
๐ ThemeToggle
A light/dark toggle in the header (and on the login page).
- Shows ๐ in light mode and โ๏ธ in dark mode; a click switches to the other theme
- Writes the device preference through
applyTheme()(lib/stores/app/themeStore.ts,localStoragekeylibrefolio-theme); while the stored preference is auto, the icon follows the operating system - The three-way choice โ light, dark, auto โ saved in the user settings lives in the Preferences tab; at login the saved theme is applied
Used by: Header.svelte, the login page.
๐ PrivacyToggle
The header's eye button that hides or shows every monetary amount (ui/PrivacyToggle.svelte).
- Flips the device-local flag of
lib/stores/app/privacyStore.svelte.ts(isPrivacyEnabled(),togglePrivacy());aria-pressedreflects it, test idprivacy-toggle - It sits in the header, not in Settings, because the need is contextual: someone walks up to the screen
How the flag reaches the formatters is in Privacy masking.
Used by: Header.svelte.
๐ DocsLink
A help icon that opens a documentation page (ui/DocsLink.svelte).
path(required) is relative to the docs root; the link opens/mkdocs/{lang}/{path}in a new tab, in the current UI language (no prefix for English)localizedFallbackPathreplacespathin the other languages, for pages that exist only in Englishicon:help(default) orbook;labelis the tooltip and the accessible name,mathrenders LaTeX in it;labelDisplay:hidden(default),responsiveorvisible- Literal
pathvalues are checked by./dev.py mkdocs check-links(scripts/docs_links.py)
Used by: metric cards (RiskMetricCard, KpiSection), the risk levels, the chart signals
section, the Tools hub, the asset detail page.
๐ AnimatedBackground
Animated chart-like background for the login and error pages.
- Three wave layers and an SVG with three chart lines, animated with CSS
- Theme-aware colours (adapts to light/dark mode)
- Fixed behind the page (
z-index: -10)
Used by: routes/+page.svelte (login, behind LoginCard/RegisterCard), routes/+error.svelte.
๐ OrderableList
A drag-and-drop reorderable list (ui/OrderableList.svelte).
- HTML5 drag and drop on desktop, with a grip handle and a green left border on the drop target
- Up/down arrow buttons below the
mdbreakpoint - Items rendered by a caller snippet;
keyFngives each a stable key - Optional equal-width responsive grid and per-item warning tone
- Reports the new order through
onReorder(items)
Used by: DataTable column reorder (in ColumnVisibilityToggle), FxProviderSelect,
ChartSignalsSection, ImportWizardModal, the PAC planner steps.
๐ PasswordInput
Located in lib/components/ui/input/
A password field with visibility toggle (eye icon).
- Toggle between
type="password"andtype="text" - Eye / EyeOff icon from lucide-svelte
autocomplete(current-passwordby default, ornew-password,off,on),idandnameare passed to the input: password managers rely on them โ see the password-manager contract
Used by: LoginCard, RegisterCard, PasswordChangeModal.
๐ช PasswordStrength
Located in lib/components/ui/input/
A password strength indicator powered by @zxcvbn-ts/core.
- Color-coded strength bar (red โ orange โ yellow โ lime โ green) with a label, from score 0 (very weak) to 4 (very strong)
- With
showRules(default), a checklist of the five rules: 8 characters, uppercase, lowercase, number, special character - Hidden while the password is empty
Used by: RegisterCard (below password field), PasswordChangeModal.
๐ข ExactDecimalInput
Located in lib/components/ui/input/
A decimal text field that never goes through a JavaScript number.
type="text"withinputmode="decimal":,and.both work as the decimal separator, and characters that can never belong to a number are filtered out while typingvalue(bindable string) is the field text; on blur or Enter a valid value is rewritten in canonical form (.separator, trailing zeros trimmed), thenoncommitfires- Validation is exact: digit budget (
maxIntegerDigits,maxFractionDigits, default 12 each),min/max(strings, compared as exact decimals),required,allowNegative;onvaliditychangereports{normalized, empty, syntaxValid, requiredValid, digitsValid, rangeValid, valid}, andexternalInvalidlets the parent mark it invalid - โ/โ step by
stepin exact decimal arithmetic, clamped to the bounds (to 0 withoutallowNegative);accelerateOnHold(defaultfalse) climbs by powers of ten while the key is held
Used by: the PAC planner steps (targets, routing, fees, liquidity, prices).
๐ฆ ExactQuantityInput
Located in lib/components/ui/input/
ExactDecimalInput for quantities, with a controlled value.
valueis always the normalized draft (.separator), while the text the user types stays in a private buffer: a parent echoing the value back never rewrites1,20into1.20mid-typing;resetKeyforces the buffer to reloadsignRule:positive,negative,nonzero,zeroorany(default) โ a sign that breaks the rule makes the value invalid and the border red, a matching one turns it greenaccelerateOnHolddefaults totrue
Used by: the quantity field of TransactionFormModal.
โฑ๏ธ CompactDurationBadge
Located in lib/components/ui/date/
A "Custom" duration chip that turns into an inline editor.
- Shows
customLabelwhile inactive and{amount}{unit}whenactive; a click opens a small number field plus a unitSimpleSelectfed byoptions(units among days, weeks, months, years) - Every valid draft โ within
min/maxand accepted byisAllowed(amount, unit)โ is applied at once (amount,unitare bindable,onapplyfires); a click outside or Escape closes the editor
Used by: the custom window of DateRangePicker, the calendar-return window of the asset
detail page.
๐ Display blocks
Located in lib/components/ui/display/ โ generic presentation blocks, kept out of dashboard/
and risk/ so any panel can reuse them.
| Component | What it draws | Used by |
|---|---|---|
KpiMetricBar |
Label, value and a horizontal bar (barPct, clamped to 0โ100, non-finite โ 0), with an optional caret marker; numericValue + formatValue animate the value |
KpiSection |
KpiDivergingFlowBar |
A bar growing left or right of a centre line: two magnitudes (depositPct, withdrawPct) or one signed value (signedPct); layout stacked or inline |
KpiSection, risk L2 |
RiskMetricCard |
One risk metric: plain-language label with its technicalName, animated value, caption, sentiment accent, docsPath โ link, optional submetrics/sparkline; the number scales with the card (container queries) and the value line keeps its place while loading |
risk levels L1โL2 |
RiskCardGrid |
The layout of risk cards: auto-fit columns of at least minWidth (default 16rem), no breakpoints, rows always full (the column count drops to a divisor of the card count) |
risk levels L1โL2 |
CurrencyAmount |
One money amount through formatCurrencyAmountHtml, rendered in runes mode so a legacy parent follows the privacy toggle โ see legacy components |
BrokerCard, broker detail, import gap fix |
BrokerBadge |
Inline broker name with its icon fallback chain | Lots views, import wizard, transaction modals |
CompactCashCell |
Compact {amount, currency} editor for table cells, with a sign hint |
TransactionFormModal, WAC preview |