Page Patterns
ListPage
The baseline for a collection screen.
import { BulkActions, ListChrome, PagerBar, ListPage } from 'faifo-design'ListPage fixes the order and rhythm of a collection screen: identity with the primary action, URL-
driven controls, tool actions, then the records. ListChrome is the row of search, filters and view
switch; BulkActions appears while rows are selected and PagerBar pages the result.
#When to use
- Use it for every full collection: orders, products, customers.
- The application owns the translated copy, the controls' URLs and the records.
- While a read is pending the page announces the busy state and dims the retained results.
#Examples
Each example is a specimen of the package catalogue, rendered on the server exactly as shown in its code.
#List page
The canonical collection hierarchy: identity with primary actions, URL-driven controls, tool actions and records.
Sales
Sales orders
Show codeHide code
import { Badge, Button, DataTable, ListChrome, ListPage } from 'faifo-design'
type OrderRow = {
id: string
customer: string
total: string
state: 'Ready' | 'Review' | 'Blocked'
}
const orders: OrderRow[] = [
{ id: 'SO-1042', customer: 'Công ty Ánh Dương', total: '18.450.000 ₫', state: 'Ready' },
{ id: 'SO-1041', customer: 'Khách sạn Mùa Hạ', total: '6.800.000 ₫', state: 'Review' },
{ id: 'SO-1039', customer: 'Nguyễn Minh Châu', total: '2.150.000 ₫', state: 'Blocked' },
]
const toneOf = (state: OrderRow['state']) =>
state === 'Ready' ? ('positive' as const) : state === 'Review' ? ('warning' as const) : ('danger' as const)
export const Example = () => (
<ListPage
variant="operational"
context="Sales / Sales orders"
eyebrow="Sales"
title="Sales orders"
headerActions={<Button label="Create order" variant="primary" />}
actions={<Button label="Export orders" variant="secondary" />}
controls={
<ListChrome
search={{
id: 'orders-query',
action: '#list-page',
value: 'Mùa Hạ',
placeholder: 'Search orders',
hidden: { view: 'all' },
}}
facets={[
{ id: 'all', label: 'All', href: '#list-page', active: true, count: 148 },
{ id: 'ready', label: 'Ready', href: '#list-page', count: 91 },
{ id: 'review', label: 'Review', href: '#list-page', count: 7 },
]}
views={[
{ id: 'table', label: 'Table', href: '#list-page', active: true },
{ id: 'kanban', label: 'Kanban', href: '#list-page' },
]}
sort={{
id: 'orders-sort',
action: '#list-page',
choices: [
{ value: 'date-desc', label: 'Newest first', selected: true },
{ value: 'total-desc', label: 'Largest total' },
{ value: 'customer-asc', label: 'Customer A-Z' },
],
}}
bulk={{
selectedCount: 1,
summary: '1 order selected',
clearHref: '#list-page',
actions: [
{ id: 'approve', label: 'Approve', name: 'intent', value: 'approve', variant: 'primary' },
{ id: 'export', label: 'Export', name: 'intent', value: 'export' },
],
}}
pager={{
summary: 'Showing 1-3 of 148',
previousHref: null,
nextHref: '#list-page',
pages: [
{ label: '1', href: '#list-page', active: true },
{ label: '2', href: '#list-page' },
{ label: '3', href: '#list-page' },
],
}}
/>
}
body={
<DataTable
title="Order list"
rows={orders}
id={(row) => row.id}
rowHref={(row) => `#${row.id}`}
responsive="stack"
selection={{ selectedIds: ['SO-1042'] }}
columns={[
{
key: 'id',
label: 'Order',
cell: (row) => row.id,
priority: 'primary',
kind: 'identifier',
sort: { href: '#list-page', direction: 'descending' },
},
{ key: 'customer', label: 'Customer', cell: (row) => row.customer },
{ key: 'total', label: 'Total', cell: (row) => row.total, align: 'end', kind: 'currency' },
{
key: 'state',
label: 'State',
cell: (row) => <Badge label={row.state} tone={toneOf(row.state)} />,
kind: 'status',
},
]}
/>
}
/>
)#List chrome
Search, filters, view switch, bulk state and paging for URL-driven collection screens.
Show codeHide code
import { ActionGroup, Button, DateRangePicker, Field, ListChrome, Menu, Stack } from 'faifo-design'
export const Example = () => (
Stack({
items: [
Stack({
items: [
<ListChrome
search={{
id: 'care-customer-query',
action: '#list-chrome',
placeholder: 'Search customers',
}}
filterMenus={[
'Assigned team',
'Care requirements',
'Source',
'Status',
'Schedule',
'Group',
].map((label, index) => (
<Menu
id={`care-customer-filter-${index}`}
label={label}
items={[{ id: 'all', label: 'All', href: '#list-chrome' }]}
/>
))}
facets={[
{ id: 'active', label: 'Active', href: '#list-chrome', active: true, count: 42 },
{ id: 'draft', label: 'Draft', href: '#list-chrome', count: 6 },
]}
views={[
{ id: 'table', label: 'Table', href: '#list-chrome', active: true },
{ id: 'cards', label: 'Cards', href: '#list-chrome' },
]}
sort={{
id: 'care-customer-sort',
action: '#list-chrome',
choices: [
{ value: 'updated-desc', label: 'Recently updated', selected: true },
{ value: 'name-asc', label: 'Name A-Z' },
],
}}
status="48 customers"
actions={<Button label="Create" variant="primary" size="compact" />}
bulk={{
selectedCount: 2,
summary: '2 customers selected',
clearHref: '#list-chrome',
actions: [{ id: 'archive', label: 'Archive', name: 'intent', value: 'archive' }],
}}
pager={{
summary: 'Showing 1-25 of 48',
nextHref: '#list-chrome',
pages: [
{ label: '1', href: '#list-chrome', active: true },
{ label: '2', href: '#list-chrome' },
],
}}
/>,
<ListChrome
bulkPresentation="replace"
search={{
id: 'selected-care-customer-query',
action: '#list-chrome',
value: 'Saved search',
}}
bulk={{
selectedCount: 2,
form: 'selected-care-customer-form',
clearLabel: 'Clear selection',
actions: [{ id: 'approve', label: 'Approve', name: 'intent', value: 'approve' }],
}}
/>,
],
}),
<ListChrome
status="1 selected"
commands={
<form action="#list-chrome">
<Stack
items={[
<Field
id="collection-feedback"
name="feedback"
label="Feedback"
type="text"
layout="inline"
/>,
<Field
id="collection-due-date"
name="dueDate"
label="Due date"
type="date"
layout="inline"
value="2026-10-13"
/>,
<ActionGroup actions={[<Button label="Apply" type="submit" />]} />,
]}
/>
</form>
}
/>,
<ListChrome
filtersToggle={{ label: 'Filters' }}
filterMenus={
<>
<DateRangePicker
id="customer-period"
variant="filter"
label="Reporting period"
startLabel="From"
endLabel="To"
locale="en"
start={{ id: 'customer-from', name: 'from', value: '2026-10-01' }}
end={{ id: 'customer-to', name: 'to', value: '2026-10-31' }}
/>
<Menu
id="customer-account"
label="Ledger account"
selectionMode="single"
items={[{ id: 'all', label: 'All accounts', checked: true, href: '#list-chrome' }]}
/>
<Menu
id="customer-partner"
label="Partner"
selectionMode="single"
items={[{ id: 'all', label: 'All partners', checked: true, href: '#list-chrome' }]}
/>
</>
}
search={{
id: 'customer-query',
action: '#list-chrome',
placeholder: 'Search customers',
}}
facets={[
{ id: 'active', label: 'Active', href: '#list-chrome', active: true, count: 42 },
{ id: 'draft', label: 'Draft', href: '#list-chrome', count: 6 },
]}
views={[
{ id: 'table', label: 'Table', href: '#list-chrome', active: true },
{ id: 'cards', label: 'Cards', href: '#list-chrome' },
]}
sort={{
id: 'customer-sort',
action: '#list-chrome',
choices: [
{ value: 'updated-desc', label: 'Recently updated', selected: true },
{ value: 'name-asc', label: 'Name A-Z' },
],
}}
status="48 customers"
actions={<Button label="Create" variant="primary" size="compact" />}
bulk={{
selectedCount: 2,
summary: '2 customers selected',
clearHref: '#list-chrome',
actions: [{ id: 'archive', label: 'Archive', name: 'intent', value: 'archive' }],
}}
pager={{
summary: 'Showing 1-25 of 48',
nextHref: '#list-chrome',
pages: [
{ label: '1', href: '#list-chrome', active: true },
{ label: '2', href: '#list-chrome' },
],
}}
/>,
],
})
)#CSR search workspace
A hydrated shell links to a search workspace without a native dialog, template or noscript copy.
Show codeHide code
import { AppTopbar } from 'faifo-design'
export const Example = () => (
<AppTopbar
search={{
mode: 'link',
action: '#search',
label: 'Search workspace',
placeholder: 'Search',
submitLabel: 'Search',
}}
/>
)#API
Generated from the package source. A property without a description has none in the source yet.
#BULK_CLEAR_COMMANDConstant
The name of the command button that asks the selecting table to clear its selection.
const BULK_CLEAR_COMMAND = 'clear-selection'#BulkActionsComponent
| Property | Description | Type | Default |
|---|---|---|---|
form | – | string | null | – |
selectedCount | The selected-row figure known when rendering. Omit it when a client runtime owns the selection: the actions then stay enabled and the runtime keeps bulk-count and data-has-selection current. | number | 0 |
summary | – | JSXChild | – |
clearHref | Clears the selection by navigation. Without it, clearLabel asks the table bound to form to clear. | string | null | – |
clearLabel | – | string | 'Clear' |
actionsrequired | – | readonly BulkAction[] | – |
#ListChromeComponent
| Property | Description | Type | Default |
|---|---|---|---|
filtersLabel | – | string | 'Filters' |
filterMenus | Filters that pick from a list rather than toggle — a Menu each, whose default size is the facets' height. They lead the facet row. | JSXChild | – |
filtersToggle | Folds the filter menus, facets, views and sort into one disclosure on a phone, where they would take several lines; wider screens show them in the row. count is the number of filters in force, shown on the toggle. | ListFiltersToggle | – |
viewsLabel | – | string | 'Views' |
search | – | ListSearch | – |
query | A richer query control, such as an expanded SearchFilter, in place of search. It leads the query row at its own width; views, sort and actions sit at the end of that row, level with its search bar, and wrap under it where the row runs out. | JSXChild | – |
facets | – | readonly ListFacet[] | – |
views | – | readonly ListFacet[] | – |
sort | – | ListSort | – |
status | – | JSXChild | – |
actions | – | JSXChild | – |
commands | Full-width command form, separate from the inline toolbar actions. | JSXChild | – |
bulk | – | BulkActionsProps | – |
bulkPresentation | Replace the query toolbar while controlled page selection is nonempty. | 'below' | 'replace' | – |
pager | – | PagerBarProps | – |
#PagerBarComponent
| Property | Description | Type | Default |
|---|---|---|---|
summary | – | JSXChild | – |
previousHref | – | string | null | – |
nextHref | – | string | null | – |
previousLabel | – | string | 'Previous page' |
nextLabel | – | string | 'Next page' |
pages | – | readonly PagerPage[] | – |
label | – | string | 'Pagination' |
#ListPageComponent
The baseline for an operational collection screen. Applications own the translated copy, URL-driven controls and records. This pattern owns their order and rhythm: identity and optional primary actions, query controls, optional separate tools, then the collection itself.
| Property | Description | Type | Default |
|---|---|---|---|
titlerequired | – | string | – |
bodyrequired | – | JSXChild | – |
context | A narrow application context strip above the page identity. The application owns its breadcrumbs and organisation switcher; the pattern owns the slot. | JSXChild | – |
variant | operational is the full workspace composition used by application collection screens. The unadorned variant remains available for embedded specimens. | 'operational' | – |
eyebrow | – | string | null | – |
description | Short operational guidance shown below the title and above controls. | JSXChild | – |
headerActions | Primary actions beside the title of an operational page, above its query controls. | JSXChild | – |
actions | Tool actions follow query controls by default, or join primary actions in the header. | JSXChild | – |
actionsPlacement | Place operational tools next to primary header actions without a separate body row. | 'header' | – |
actionsHidden | Hide only the operational tool slot without unmounting associated forms or hiding primary actions. | boolean | – |
controls | – | JSXChild | – |
selection | Commands for the rows the reader has checked. They take the place of the query controls while a selection exists, right beside the checkboxes that made it, and give the place back when it is cleared. The slot starts hidden; the selection runtime reveals it. | JSXChild | – |
status | – | JSXChild | – |
footer | – | JSXChild | – |
busy | The island owns timing; the pattern owns stale-result emphasis. | boolean | – |
dimmed | – | boolean | – |
#Types
#BulkAction
| Property | Description | Type | Default |
|---|---|---|---|
idrequired | – | string | – |
labelrequired | – | string | – |
name | – | string | – |
value | – | string | – |
variant | – | ActionVariant | – |
disabled | – | boolean | – |
#BulkActionsProps
The properties of BulkActions, listed above.
#ListChromeProps
The properties of ListChrome, listed above.
#ListFacet
| Property | Description | Type | Default |
|---|---|---|---|
idrequired | – | string | – |
labelrequired | – | string | – |
hrefrequired | – | string | – |
active | – | boolean | – |
count | – | number | string | – |
#ListFiltersToggle
| Property | Description | Type | Default |
|---|---|---|---|
labelrequired | – | string | – |
count | – | number | – |
#ListSearch
| Property | Description | Type | Default |
|---|---|---|---|
id | – | string | – |
actionrequired | – | string | – |
name | – | string | – |
value | – | string | null | – |
placeholder | – | string | null | – |
label | – | string | – |
submitLabel | – | string | – |
hidden | – | Readonly<Record<string, string>> | – |
#ListSort
| Property | Description | Type | Default |
|---|---|---|---|
id | – | string | – |
actionrequired | – | string | – |
name | – | string | – |
label | – | string | – |
submitLabel | – | string | – |
choicesrequired | – | readonly ListSortChoice[] | – |
hidden | – | Readonly<Record<string, string>> | – |
#ListSortChoice
| Property | Description | Type | Default |
|---|---|---|---|
valuerequired | – | string | – |
labelrequired | – | string | – |
selected | – | boolean | – |
#PagerBarProps
The properties of PagerBar, listed above.
#PagerPage
| Property | Description | Type | Default |
|---|---|---|---|
id | Stable identity when the destination changes or becomes disabled. | string | – |
labelrequired | – | string | – |
hrefrequired | – | string | null | – |
active | – | boolean | – |
#ListPageProps
The properties of ListPage, listed above.
#Hooks
The data-ui values these components render. Select them in tests and behaviour; their look belongs to the design system. See Contract.
list-pagelist-page-contextlist-page-headerlist-page-headinglist-page-title-rowlist-page-eyebrowlist-page-titlelist-page-descriptionlist-page-actionslist-page-toolslist-page-toolbarlist-page-controlslist-page-statuslist-page-bodylist-page-footerlist-chromelist-chrome-rowlist-querylist-searchlist-search-labellist-search-inputlist-search-submitlist-filterslist-filters-togglelist-filters-countlist-filter-menuslist-facetslist-facetlist-facet-countlist-view-switchlist-viewlist-sortlist-sort-labellist-sort-selectlist-statuslist-actionslist-commandsbulk-actionsbulk-summarybulk-countbulk-action-listpager-barpager-summarypager-pagespager-pagepager-actionspager-link