Skip to content

UI/UX standards

These standards keep screens predictable across financial modules. When a page needs an exception, prefer creating a named variant instead of one-off spacing, borders, or action layouts.

For the core brand philosophy, logo geometry, and color strategy, refer to the Brand Identity Manual (DESIGN.md).

Every standard module should follow this order:

  1. Page title block with app-page-header, app-gradient-title, and app-page-title.
  2. Page action panel with app-action-panel when actions are available.
  3. Search and filters in a dedicated filter area, directly above the data surface.
  4. Content surface or table/list shell with app-table-shell.
  5. Pagination, totals, or secondary table metadata at the bottom of the same surface.

A screen is a title and its content. Sentences that explain a screen belong in the help drawer, not on the screen:

  • No visible subtitle under a page title. Put the one-line description in an element with app-page-about (screen readers still read it) and list it in SCREEN_ABOUT in src/components/help/helpTopics.ts, which the help drawer shows under “On this screen”.
  • No card heading that repeats the page title (“Manage Your Accounts” on Accounts), and no card description that restates its own title or button.
  • Status is a figure and a colour, such as “€20.26 over budget” in red, not a sentence about it.
  • Controls that belong together share one row (the transfers switch and Reset), and an empty selection bar is hidden.
  • Lists of things are cards, not tables, at every size (EntityCardGrid): a name, one figure and one quiet line. Mark a column card: "primary" or card: "meta"; the rest shows in the details that open when the card is clicked.
  • How-to text (“Open Actions, then…”) goes in a FeatureHint (the ⓘ beside a title) or a help card, never inline.

The title/tagline must not share a row with dense action groups on mobile. Keep the title aligned to the same left edge as the filter and table shell.

Everything AI is one page (src/pages/AiHubPage.tsx) under the sidebar entry “AI & agents”: the master AI features switch, then two collapsible bars, “AI inside the app” and “Chat with your data from an AI agent”. Each bar shows its own state, turns green only when that part can really do its job, says that it is independent of the other, and stays mounted while closed so its status stays current. Do not split AI settings across pages or put an API key anywhere but the provider dialog. Both sections read the same state, so they can never disagree; the agent steps open on the choice that matches the provider in use. With AI off only the switch and a “Turn on AI” button show. Where a section cannot work (agents on the web) say why in one line instead of hiding it.

Settings that are not about one ledger must open with no ledger open. List their routes in src/constants/ledgerFreeRoutes.ts; AppShell shows them in a slim frame that leads back to the ledger list.

Use this order for module actions:

  1. Maintenance actions, such as reconcile, detect transfers, clean up, de-duplicate, or auto-categorize.
  2. Import.
  3. Export.
  4. Primary create action, such as Add Transaction or Add Account.
  5. Refresh as an icon-only utility at the end when present.

Desktop actions may use icon plus label. Mobile secondary actions should be icon-first or icon-only with title, aria-label, and screen-reader text. The primary create action should keep its label because it is the main task entry point.

Import/export should stay local to the module when the data type is module-specific. Global backup, restore, and full-data import/export belong under Data or Settings.

Search belongs above the table/list surface, not inside the table header, card body, or page action panel.

Use one search/filter area per screen:

  • Transactions, Dashboard, Analytics, Reports, and Scheduled: the shared TransactionSearchBox (the search box, its “Understood as” suggestions, and the chips for what is applied). Scheduled passes its own filter state and a placeholder; nothing else differs.
  • Management modules: app-filter-panel with the module search input. The Accounts list reads its query with the same parser (filterAccounts in src/utils/searchFilters.ts).

The applied-filters row sits directly above the search box and is always there: it reads “No filters applied” when empty, so nothing shifts when the first filter is added (only a long list wrapping onto more rows moves the page). It goes above the box, not below, so a pick shows where the eyes already are and the suggestion list opening under the box never covers it. Every applied filter (date, accounts, categories, vendors, amount, income/expense, top-N, text) has a chip that removes it.

The suggestion list never applies anything on its own. Picking a piece applies only that piece and keeps the rest on offer; Apply all takes what is left and Clear / Done end the interaction. Say how filters combine in as few words as possible, on the “Understood as” line itself (“all filters must match”); the fuller explanation belongs in the user guide, not on screen.

Every piece of text meets WCAG AA (4.5:1, or 3:1 for large text) in both themes.

  • Pair every light-mode text colour with a dark: colour. A colour that is fine on white (text-green-500) can be unreadable on a dark card, and the dark theme’s destructive red is far too dark to use as text on a dark surface (use text-red-600 dark:text-red-400).
  • Use -700 for green, emerald and amber text on light surfaces, and -600 for red, rose, blue and indigo. text-slate-400 is not body text in light mode.
  • Do not fade rows or text with opacity-* to mean “inactive” or “future”: it drops text below 4.5:1. Use italics, a tint or a dashed border (as future transactions and ended schedules do).
  • Pale brand colours are for fills and icons. For text on a tint use --brand-accent-text.
  • Chart legends use the foreground colour, not the series colour.

Boundaries need contrast too (WCAG 1.4.11): the outline of an input, select, search box or outline button, and the off state of a switch, reach 3:1 against the page. They use --input, which is deliberately separate from the quieter --border used for cards and table rules. Measure both text and outlines when checking a theme; in dark mode --input was once 1.05:1, so the search box had no visible edge.

  • Rows of buttons are centred on small screens (flex flex-wrap justify-center, left-aligned from sm: up) and share the space (flex-1 with a small basis/max-w). Do not use an auto-fit grid for a row whose last item spans the full width: it keeps an empty column, so the buttons sit left with a gap at the right.
  • A page is never wider than the screen. The sidebar’s inset area is a flex item and needs min-w-0 (it has it); any flex or grid child that holds text needs min-w-0 and truncate/wrapping too. One unwrappable line (a long remark, a long placeholder) otherwise stretches the whole page past the screen, which also makes centred content look off-centre. Check by emulating a 390 px phone and comparing document.documentElement.scrollWidth with the window width on every screen.

Phone cards swipe and long press through one shared component, SwipeableCard (src/components/cards/). Use it for every new list of cards; do not write another gesture handler.

  • Reveal, then tap. A swipe slides the card to show one button; the action runs only when that button is tapped. A swipe never deletes or changes anything on its own, and there is no full-swipe shortcut.
  • Left is Delete, right is harmless. Swipe left reveals Delete; swipe right reveals the card’s most useful harmless action (Duplicate or Edit), or nothing. Never put a destructive action on the right. Delete keeps the confirmation the menu already has.
  • One action list. Build the card’s CardAction list once and pass it to the swipe buttons and the menu, so a gesture can never offer something the menu does not. Give revealed buttons an ariaLabel that names the item (“Delete Everyday Checking”).
  • Gestures are never the only route. Keep a visible ”…” button or inline Edit/Delete buttons on every card. Long press opens the same menu as the ”…” button.
  • Don’t fight the system. Vertical scrolling wins: the card claims a drag only after 12px sideways movement that is at least 1.5 times the vertical movement. Touches that start within 20px of the left screen edge belong to the iOS back swipe. Presses that start on an input, textarea, link, button or [data-selectable-text] element neither swipe nor long-press. Only touch and pen swipe; a mouse keeps its buttons.
  • Off when it would surprise. Cards don’t swipe in select mode, while the item is being edited, or when it can’t be deleted.
  • Reduced motion. With reduce motion on (the app’s setting or the device’s), the card jumps open and shut without sliding.
  • Contrast. White text on the revealed button: bg-red-700 dark:bg-red-600 for Delete (6.4:1 and 4.8:1), bg-blue-700 dark:bg-blue-600 for the others. The revealed button is at least 44px tall and its label wraps at Larger text.
  • Opaque sliding layer. The sliding layer must be the colour the card sits on (contentClassName, e.g. bg-card inside a Card), and the wrapper takes the card’s corner radius, so no mismatched rectangle shows behind a card while it moves.

Every selectable data surface should include:

  • A visible outer shell using app-table-shell.
  • A persistent selection toolbar using app-table-toolbar, even when zero rows are selected.
  • Disabled bulk actions at zero selections.
  • Icon-first bulk actions on mobile, with labels returning on wider screens.
  • Consistent selected-row styling with app-row-selected.

Desktop tables can use table rows. Mobile tables should render cards, but selection behavior must remain visually equivalent: the selected state should outline all edges of the row/card. Avoid dashed borders for normal data rows because they read like inconsistent selection or incomplete data.

Section cards should use a visible header divider through app-section-header. Section titles should use app-section-title, which is intentionally smaller than app-page-title.

Use card titles for section names, not page-scale headings. Reserve gradient titles for page headers and major report headers only.

Use these shared classes before adding new surface styles:

  • app-action-panel for page actions.
  • app-filter-panel for search and filters.
  • app-table-shell for bordered data surfaces.
  • app-mobile-row for mobile row cards.
  • app-row-selected for selected row/card state.
  • app-section-header and app-section-title for section cards.

Avoid local combinations of rounded-xl border bg-white/50 dark:bg-black/20 when one of the shared classes fits. This keeps light and dark mode borders from drifting independently.

Before shipping a module screen, check:

  • The title, action panel, search/filter area, and table shell are vertically ordered.
  • Import appears before export, and both sit after maintenance actions.
  • Search is above the data shell.
  • Text passes 4.5:1 in light and dark mode (see Text Contrast), including empty and “inactive” states.
  • Selectable tables show a zero-selection toolbar.
  • Mobile bulk actions do not create horizontal scrolling.
  • Phone cards use SwipeableCard, with a visible ”…” or inline buttons as well (see Gestures).
  • Selected mobile rows/cards have a full perimeter highlight.
  • Section headings are smaller than page headings.
  • Section headers use the same border treatment.

The root homepage (/) is the only page that does not follow the standard module structure. It is designed for conversion and trust:

  1. Hero Section: Must clearly state the “Privacy-first, Data local, Open sourced” mission.
  2. Social Proof/Trust: Use badges (MIT, CircleCI) and feature previews to build credibility.
  3. Action Orientation: Primary CTA should always lead to /ledgers. Secondary CTA for local installation.
  4. Theme Consistency: Must support both light and dark modes, using the same semantic colors as the app but with more expressive typography and spacing.
  5. Guidance: Explicitly mention the importance of backups and CSV imports to set clear expectations for local-first users.