Layout Patterns

The frame every page shares, then the page templates TimelyCare products build on it, each drawn live with the real Helix compounds.

For each template: when to use it, its parts in order, and the rules it follows. The frames on the Usage tab render the same code at desktop width; the source is in apps/docs/src/components/previews/preview-route/templates/. These are compositions of shipped components, not components of their own: copy the structure, not the sample data.


The frame

App frame

Every authenticated page.

  1. AppShell with AppSidebar (the nav) and AppShellTopBar (global chrome only: logo, search, notifications, the user menu).
  2. One PageHeader, first in the page: a breadcrumb on child pages only, the h1, an optional description, and the page's actions on the right with one primary at most.
  3. The page's content.

Rules:

  • Page chrome never goes in the top bar. The title, breadcrumb and page actions belong to PageHeader (helix-app-layouts, AppShell vs PageHeader ownership).
  • A top-level page (a nav destination) has no breadcrumb. A child page's breadcrumb comes from the nav model, with the record's name as the trailing crumb, and uses the chevron separator (NavBreadcrumb).
  • A record's status follows its name as the heading's adornment, never a line under the title.
  • Page content stops at 1280px (max-w-7xl), centred beside the sidebar. AppShell applies the cap, so pages don't add their own max-w-* (AppShell, content width).
  • AppShell supplies the page inset and the gap between sections. Don't pad the page root.

Mode frame

While staff view the app as someone else, or preview it.

  1. AppShell mode with an AppShellMode: one sentence naming the mode and what it means, and the way out ("Exit emulation").
  2. The app, unchanged, inside the frame.

Rules:

  • A mode the person is in frames the whole app. It is never a banner or an in-page Alert, which scroll away and read like any other notice.
  • tone="warning" when what they do is real; tone="info" when nothing is saved.
  • A notice about the whole app (an outage) is an Alert, not a mode.

Dialog sizes

Every dialog. Size it to the task, from the table in helix-app-layouts (the only owner of dialog sizes):

SizeClassUse for
Smallsm:max-w-md (448px)Decisions and confirmations. Destructive confirmations are always Small.
Mediumdefault, sm:max-w-lg (512px)Forms with a few fields
Widesm:max-w-2xl (672px)Multi-step wizards, a calendar or a list on its own
Extra-widesm:max-w-4xl (896px)Side-by-side pickers that don't fit at 672px
Full-pagesee helix-app-layoutsLong-form reading (policies, terms)

Page templates

List page

A page that lists one kind of record: members, organizations, providers.

  1. ListPageTemplate: the title, a description and one primary action ("Add member").
  2. One toolbar row, a FilterBar: search in FilterBarStart, up to three filter selects, Download last.
  3. The table, Table variant="card", with TableColumnSettings in its last header cell.
  4. Range pagination under the table.

Rules:

  • One toolbar row. Pass hideSearch to the template and put the search in the FilterBar, so there is never a second search row (FilterBar).
  • The toolbar and pagination sit on the page, around the table card, never inside it.
  • Rows with a detail page are clickable, by mouse and by Enter or Space. In-row actions go in a kebab that shares the column-settings column.
  • Status is an outline pill in the status tone: Active is success, Invited is info, Pending is warning, Inactive is neutral (helix-ux, status and tone).

Tabbed report

A report with several views of the same data: an overview and the rows behind it.

  1. PageHeader.
  2. One toolbar row: the view Tabs on the left; the filters, then Download, right-aligned as one group.
  3. Overview: a scanning row of MetricCards, then a grid of chart cards. Data: one card table, then range pagination.

Rules:

  • The toolbar is one row and never wraps. Filters that stop fitting fold behind a Filter button (helix-app-layouts, tabbed report toolbar).
  • An empty metric shows a muted dash and says why (emptyLabel), never a blank card.
  • Report rows with no detail page aren't clickable and carry no kebab.

Analytics dashboard

A page of numbers someone scans: usage, outcomes, volume.

  1. PageHeader, with the export action.
  2. A FilterBar of filters, as context above the numbers.
  3. A scanning row of basic MetricCards.
  4. A grid of chart cards: ChartContainer inside a Card.

Rules:

  • Filters sit above the numbers they change, never in a popover (helix-data-patterns, analytics dashboard composition).
  • Series colours are the chart-1 to chart-5 tokens.

Queue

Work waiting for someone: visits to accept, cases to review.

  1. PageHeader.
  2. Either status Tabs in the toolbar over one card table, or one Card per queue when a page holds several (each a Table variant="flush" under a CardHeader).
  3. Range pagination under a single table.

Rules:

  • A tab carries a count only when the count is a triage signal ("Waiting"), not on every tab.
  • Rows waiting on a person take the warning tone.
  • Every row opens its record; in-row actions sit in a kebab.

Record detail

One member, case or visit.

  1. PageHeader: the breadcrumb, the record's name as the h1, its status as the adornment, and the record's actions with one primary at most.
  2. The record's sections, one Card each: under line Tabs, beside a one-third side column, or below a summary card.

Rules:

  • Each card hugs its content. Columns are stacks aligned to the top, so no card stretches to match its neighbour (helix-app-layouts, entity detail page).
  • A section's own action sits in that card's CardAction; record actions sit in the header.
  • A notice about this record is an Alert in the page.

Create form

Adding one record from its list.

  1. PageHeader: the breadcrumb, the h1 and one sentence of purpose. No actions.
  2. The form in one Card, with Cancel then the primary ("Add member") right-aligned in its footer.

Rules:

  • A grid form (fields side by side) runs the full content width and drops to one column below md. A single-column form stops at max-w-2xl, left-aligned.
  • Max width: max-w-2xl (672px) — Prevents overly wide forms on large screens.
  • Required fields take required on the Field and the control, with a note saying what the marker means. Placeholders are examples that start "e.g."; a format rule goes in the field's description (helix-form-patterns).

Settings

An account or configuration page.

  1. PageHeader.
  2. A stack of EditableSections, capped at max-w-2xl and left-aligned.

Rules:

  • Admin surfaces save each section on its own (variant="card-edit"): Edit opens one section, which saves or cancels by itself. No page-level save.
  • Consumer surfaces save once (variant="form-save"): the sections are labelled groups with one save bar at the end of the form, not sticky (helix-form-patterns, EditableSection variant selection).

Wizard

A task with ordered steps: onboarding, scheduling a visit.

  1. A Stepper for where the person is, with StepperCount ("Step 2 of 3").
  2. The step's fields.
  3. The footer: Back on the left (never on step 1), Next on the right.

Rules:

  • On a page, a horizontal Stepper with the count in the step card's header. In a dialog, linear-progress, with the count ending the title row; size the dialog Wide, or Extra-wide for side-by-side pickers.
  • Next is disabled, never hidden, until the step is valid, and the reason is on screen (helix-form-patterns, a disabled Next says why).

Messages

Message threads, as their own page or on the record they belong to.

  1. PageHeader with the one primary ("New message").
  2. The threads in one Card: avatar at the top of each row, then the sender with an Unread badge after the name, the subject and one line of preview.
  3. On a record: a conversation Card with the thread list on a third and the open thread, with its compose row, on the rest.

Rules:

  • Every row keeps one height whether it is unread or not; unread is said in words, by the badge, not by weight or colour alone.
  • The open thread is marked and isn't also a link to itself.

Clinical workspace

A live visit, where a clinician works with a member in front of them.

  1. AppShell with contentWidth="full": the workspace fills the viewport edge to edge, and the nav closes while the visit is in progress (sidebarOpen).
  2. A pinned visit header: the visit type, then the member (name as the h1, badges, an identity line), then the visit's actions with one primary, "Finish visit".
  3. The main pane, scrolling on its own: the video while video is on, then line Tabs pinned to the top of the pane.
  4. A ToolPanel at the right edge: a rail of labelled tools, each opening a panel that scrolls on its own. One view is open at a time.

Rules:

  • contentWidth="full" is for a workspace like this one, never for a table that wants more room.
  • The rail's toggles show their labels, so they need no tooltip to be named. Icon-only buttons in the header and video controls are named by tooltip.
  • The workspace is the viewport's height and the window never scrolls on desktop (helix-app-layouts, workspace).

Loading, empty and error

What a page's content area shows when it has no rows: loading, empty, filtered to nothing, failed.

  1. The PageHeader, unchanged in every state.
  2. The content area, in one of four states.

Rules:

  • Loading a table's first page shows TableSkeleton, shaped like the table. A Spinner is for a short action inside a control.
  • Empty on first run uses Empty with the page's primary action.
  • Filtered to nothing is its own empty state: it says the filters are why and offers "Clear all", with the filters still on screen.
  • An error is a destructive Alert with "Try again". It never looks like emptiness.
  • Pagination renders nothing unless there are rows (helix-ux, waiting and failure).

Sign in

The signed-out entry to a product. No AppShell.

  1. Consumer products use the split view: the logo row, the form in a 448px column (max-w-md) on the left, a photo on the right with the help Alert over its foot on the first step. Footer links sit at the bottom of the first step; later steps pin Back and Continue to the bottom of the form side.
  2. On a phone, the first step shows the photo as a band above the logo with nothing over it, and the help Alert moves under the buttons. Later steps drop the photo.
  3. Internal tools use one centred Card on the sand page, with the h1 inside it.

Rules:

  • One h1 per page. Placeholders are "e.g." examples. Continue is disabled with its reason shown until the step is valid.
  • The photo has alt text describing it; the help Alert is already on screen, so it is not a live region.

TimelyCare Design System

v0.14.0