# From a simple site to an ERP app

Each step builds on the last. Stop at any step. Statuses are as of this build.

## Step 1: a plain content page

Link `css/domestic.css` and write semantic HTML. The [base layer](https://domestic-ui.odonckers.dev/components/base.md) styles it with no classes. Arrange content with the layout primitives:

- [Action bar](https://domestic-ui.odonckers.dev/layouts/action-bar.md): A long form whose Save and Cancel buttons stay in a sticky bar at the bottom of the window, with scroll margins so the bar never hides the focused field (WCAG 2.4.11).
- [Cluster](https://domestic-ui.odonckers.dev/layouts/cluster.md): An inline group that wraps onto new lines (buttons, tags, nav links).
- [Grid](https://domestic-ui.odonckers.dev/layouts/grid.md): A responsive grid: as many columns as fit, each at least --grid-min wide, never wider than the container.
- [Page](https://domestic-ui.odonckers.dev/layouts/page.md): A page that is not an app shell is laid out from its landmarks alone: the \<header>, \<nav>, \<main> and \<footer> that are children of \<body> share one centered column, --dui-size-page wide at most, with an inline gutter so nothing touches the window edge.
- [Scroll](https://domestic-ui.odonckers.dev/layouts/scroll.md): A scroll container for content wider than the screen, such as a data table, so it scrolls on its own instead of widening the page.
- [Stack](https://domestic-ui.odonckers.dev/layouts/stack.md): Vertical flow with a consistent gap between children.

Theme with semantic [tokens](https://domestic-ui.odonckers.dev/tokens/index.md).

## Step 2: site navigation

- [Site navigation](https://domestic-ui.odonckers.dev/patterns/nav.md): The main links of a site in a `<nav>` landmark, with the current page marked.
- [Breadcrumb](https://domestic-ui.odonckers.dev/patterns/breadcrumb.md): The path to the current page: an ordered list of links in a labelled `<nav>`.
- [Search](https://domestic-ui.odonckers.dev/patterns/search.md): A search form in a `<search>` landmark with an `<input type="search">`.
- [Pagination](https://domestic-ui.odonckers.dev/patterns/pagination.md): Links to the pages of a long list of results.

All of these are available.

## Step 3: interactive widgets

Use a native element where one exists, and an APG pattern where not:

- [Disclosure](https://domestic-ui.odonckers.dev/patterns/disclosure.md): A summary that shows or hides more content, built on `<details>` and `<summary>`.
- [Tabs](https://domestic-ui.odonckers.dev/patterns/tabs.md): Sections of content shown one at a time, chosen from a list of tabs.
- [Dialog and drawer](https://domestic-ui.odonckers.dev/patterns/dialog.md): A modal `<dialog>`, either centered or as a drawer along one edge of the viewport.
- [Popover](https://domestic-ui.odonckers.dev/patterns/popover.md): Content shown on top of the page from a button, with the `popover` attribute.
- [Menu button](https://domestic-ui.odonckers.dev/patterns/menu-button.md): A button that opens a menu of actions.
- [Toolbar](https://domestic-ui.odonckers.dev/patterns/toolbar.md): A row of related controls that is one stop in the tab order.
- [Typeahead](https://domestic-ui.odonckers.dev/patterns/typeahead.md): A text field that suggests values as you type: `<datalist>` first, an APG combobox where it falls short.
- [Alerts](https://domestic-ui.odonckers.dev/patterns/alerts.md): Status messages, from notices in the page to live alerts and toasts.
- [Card](https://domestic-ui.odonckers.dev/patterns/card.md): A self-contained item, such as an article teaser, on a raised surface.

All of these are available.

## Step 4: the app shell

Frame the app with navigation and context sidebars, then lay out each screen:

- [App shell](https://domestic-ui.odonckers.dev/patterns/app-shell.md): The frame of an application: header, primary sidebar, main content and an optional auxiliary sidebar.
- [List-detail](https://domestic-ui.odonckers.dev/patterns/list-detail.md): A list of items beside the details of the selected one, stacked on narrow screens.
- [Split](https://domestic-ui.odonckers.dev/patterns/split.md): Two regions side by side at a set ratio, stacked on narrow screens.
- [Dashboard](https://domestic-ui.odonckers.dev/patterns/dashboard.md): A grid of summary sections, each with a heading, that reflows to fit the screen.

All of these are available.

## Step 5: data-heavy screens

Records in a native `<table>`, a filter bar, grouped forms and compact density:

- [Data table](https://domestic-ui.odonckers.dev/patterns/data-table.md): Rows of records in a native `<table>` with a caption, header cells and optional sorting.
- [Filter bar](https://domestic-ui.odonckers.dev/patterns/filter-bar.md): A row of native form controls that narrows a list or table.
- [Large forms](https://domestic-ui.odonckers.dev/patterns/large-forms.md): Long forms split into labelled groups, in one or more columns.
- [Compact density](https://domestic-ui.odonckers.dev/patterns/density.md): A compact density token that tightens spacing for data-heavy screens.

All of these are available.
