Search the documentation

Type to search page titles, component names and descriptions.

    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

    Sales

    Sales orders

    1 order selectedClear

    Order list

    OrderCustomerTotalState
    SO-1042Công ty Ánh Dương18.450.000 ₫Ready
    SO-1041Khách sạn Mùa Hạ6.800.000 ₫Review
    SO-1039Nguyễn Minh Châu2.150.000 ₫Blocked
    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.

    Assigned team
    Care requirements
    Source
    Status
    Schedule
    Group
    48 customers
    2 customers selectedClear
    2 selected
    1 selected
    Filters
    Ledger account
    Partner
    48 customers
    2 customers selectedClear
    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' },
              ],
            }}
          />,
        ],
      })
    )

    A hydrated shell links to a search workspace without a native dialog, template or noscript copy.

    Show codeHide code

    #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

    PropertyDescriptionTypeDefault
    form–string | null–
    selectedCountThe 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.number0
    summary–JSXChild–
    clearHrefClears the selection by navigation. Without it, clearLabel asks the table bound to form to clear.string | null–
    clearLabel–string'Clear'
    actionsrequired–readonly BulkAction[]–

    #ListChromeComponent

    PropertyDescriptionTypeDefault
    filtersLabel–string'Filters'
    filterMenusFilters that pick from a list rather than toggle — a Menu each, whose default size is the facets' height. They lead the facet row.JSXChild–
    filtersToggleFolds 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–
    queryA 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–
    commandsFull-width command form, separate from the inline toolbar actions.JSXChild–
    bulk–BulkActionsProps–
    bulkPresentationReplace the query toolbar while controlled page selection is nonempty.'below' | 'replace'–
    pager–PagerBarProps–

    #PagerBarComponent

    PropertyDescriptionTypeDefault
    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.

    PropertyDescriptionTypeDefault
    titlerequired–string–
    bodyrequired–JSXChild–
    contextA narrow application context strip above the page identity. The application owns its breadcrumbs and organisation switcher; the pattern owns the slot.JSXChild–
    variantoperational is the full workspace composition used by application collection screens. The unadorned variant remains available for embedded specimens.'operational'–
    eyebrow–string | null–
    descriptionShort operational guidance shown below the title and above controls.JSXChild–
    headerActionsPrimary actions beside the title of an operational page, above its query controls.JSXChild–
    actionsTool actions follow query controls by default, or join primary actions in the header.JSXChild–
    actionsPlacementPlace operational tools next to primary header actions without a separate body row.'header'–
    actionsHiddenHide only the operational tool slot without unmounting associated forms or hiding primary actions.boolean–
    controls–JSXChild–
    selectionCommands 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–
    busyThe island owns timing; the pattern owns stale-result emphasis.boolean–
    dimmed–boolean–

    #Types

    #BulkAction

    PropertyDescriptionTypeDefault
    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

    PropertyDescriptionTypeDefault
    idrequired–string–
    labelrequired–string–
    hrefrequired–string–
    active–boolean–
    count–number | string–

    #ListFiltersToggle

    PropertyDescriptionTypeDefault
    labelrequired–string–
    count–number–

    #ListSearch

    PropertyDescriptionTypeDefault
    id–string–
    actionrequired–string–
    name–string–
    value–string | null–
    placeholder–string | null–
    label–string–
    submitLabel–string–
    hidden–Readonly<Record<string, string>>–

    #ListSort

    PropertyDescriptionTypeDefault
    id–string–
    actionrequired–string–
    name–string–
    label–string–
    submitLabel–string–
    choicesrequired–readonly ListSortChoice[]–
    hidden–Readonly<Record<string, string>>–

    #ListSortChoice

    PropertyDescriptionTypeDefault
    valuerequired–string–
    labelrequired–string–
    selected–boolean–

    #PagerBarProps

    The properties of PagerBar, listed above.

    #PagerPage

    PropertyDescriptionTypeDefault
    idStable 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-page
    • list-page-context
    • list-page-header
    • list-page-heading
    • list-page-title-row
    • list-page-eyebrow
    • list-page-title
    • list-page-description
    • list-page-actions
    • list-page-tools
    • list-page-toolbar
    • list-page-controls
    • list-page-status
    • list-page-body
    • list-page-footer
    • list-chrome
    • list-chrome-row
    • list-query
    • list-search
    • list-search-label
    • list-search-input
    • list-search-submit
    • list-filters
    • list-filters-toggle
    • list-filters-count
    • list-filter-menus
    • list-facets
    • list-facet
    • list-facet-count
    • list-view-switch
    • list-view
    • list-sort
    • list-sort-label
    • list-sort-select
    • list-status
    • list-actions
    • list-commands
    • bulk-actions
    • bulk-summary
    • bulk-count
    • bulk-action-list
    • pager-bar
    • pager-summary
    • pager-pages
    • pager-page
    • pager-actions
    • pager-link