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).
Page Structure
Section titled “Page Structure”Every standard module should follow this order:
- Page title block with
app-page-header,app-gradient-title, andapp-page-title. - Page action panel with
app-action-panelwhen actions are available. - Search and filters in a dedicated filter area, directly above the data surface.
- Content surface or table/list shell with
app-table-shell. - Pagination, totals, or secondary table metadata at the bottom of the same surface.
Show, don’t explain
Section titled “Show, don’t explain”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 inSCREEN_ABOUTinsrc/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 columncard: "primary"orcard: "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.
AI & Agents Pages
Section titled “AI & Agents Pages”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.
Action Buttons
Section titled “Action Buttons”Use this order for module actions:
- Maintenance actions, such as reconcile, detect transfers, clean up, de-duplicate, or auto-categorize.
- Import.
- Export.
- Primary create action, such as Add Transaction or Add Account.
- 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 And Filters
Section titled “Search And Filters”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-panelwith the module search input. The Accounts list reads its query with the same parser (filterAccountsinsrc/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.
Text Contrast
Section titled “Text Contrast”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’sdestructivered is far too dark to use as text on a dark surface (usetext-red-600 dark:text-red-400). - Use
-700for green, emerald and amber text on light surfaces, and-600for red, rose, blue and indigo.text-slate-400is 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.
Phones
Section titled “Phones”- Rows of buttons are centred on small screens (
flex flex-wrap justify-center, left-aligned fromsm:up) and share the space (flex-1with a smallbasis/max-w). Do not use anauto-fitgrid 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 needsmin-w-0andtruncate/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 comparingdocument.documentElement.scrollWidthwith the window width on every screen.
Gestures
Section titled “Gestures”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
CardActionlist 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 anariaLabelthat 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-600for Delete (6.4:1 and 4.8:1),bg-blue-700 dark:bg-blue-600for 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-cardinside a Card), and the wrapper takes the card’s corner radius, so no mismatched rectangle shows behind a card while it moves.
Tables And Lists
Section titled “Tables And Lists”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
Section titled “Section Cards”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.
Borders And Surfaces
Section titled “Borders And Surfaces”Use these shared classes before adding new surface styles:
app-action-panelfor page actions.app-filter-panelfor search and filters.app-table-shellfor bordered data surfaces.app-mobile-rowfor mobile row cards.app-row-selectedfor selected row/card state.app-section-headerandapp-section-titlefor 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.
Implementation Checklist
Section titled “Implementation Checklist”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.
Public Landing Page
Section titled “Public Landing Page”The root homepage (/) is the only page that does not follow the standard module structure. It is designed for conversion and trust:
- Hero Section: Must clearly state the “Privacy-first, Data local, Open sourced” mission.
- Social Proof/Trust: Use badges (MIT, CircleCI) and feature previews to build credibility.
- Action Orientation: Primary CTA should always lead to
/ledgers. Secondary CTA for local installation. - Theme Consistency: Must support both light and dark modes, using the same semantic colors as the app but with more expressive typography and spacing.
- Guidance: Explicitly mention the importance of backups and CSV imports to set clear expectations for local-first users.