Search the documentation

Type to search page titles, component names and descriptions.

    Page Patterns

    FormPage, DashboardPage and BoardPage

    Compatibility patterns for screens that already use them.

    import { FormPage, DashboardPage, BoardPage } from 'faifo-design'

    These three patterns are deprecated. They remain for existing screens and are not starting points for new ones.

    #When to use

    • Use RecordPage instead of FormPage.
    • Compose an overview with WorkspacePage layout="flow" instead of DashboardPage.
    • Compose a board, a schedule or a timeline with WorkspacePage layout="canvas" instead of BoardPage.

    #Examples

    Each example is a specimen of the package catalogue, rendered on the server exactly as shown in its code.

    #Form page

    The canonical form hierarchy: record identity and decision first, a stable form column, then durable context.

    Customers / Mùa Hạ Riverside

    Mùa Hạ Riverside

    Active

    Main information

    Clear Reference to enter a manual note.
    Show codeHide code
    import { Badge, Button, FormPage, RecordForm, Section, Stack, Surface } from 'faifo-design'
    
    export const Example = () => (
      <FormPage
        variant="operational"
        context="Customers / Mùa Hạ Riverside"
        title="Mùa Hạ Riverside"
        status={<Badge label="Active" tone="positive" />}
        actions={<Button label="Save partner" variant="primary" />}
        body={
          <Surface
            title="Main information"
            body={
              <RecordForm
                action="#form-page"
                fields={[
                  { id: 'partner-name', name: 'name', label: 'Name', value: 'Mùa Hạ Riverside' },
                  { id: 'partner-ref', name: 'ref', label: 'Reference', value: 'CUS-0042' },
                  {
                    id: 'partner-note',
                    name: 'note',
                    label: 'Manual reference note',
                    readOnlyWhen: 'ref',
                    help: 'Clear Reference to enter a manual note.',
                  },
                  {
                    id: 'partner-fallback',
                    name: 'fallback',
                    label: 'Unreferenced contact',
                    hiddenWhen: 'ref',
                  },
                  {
                    id: 'partner-email',
                    name: 'email',
                    label: 'Email',
                    type: 'email',
                    value: 'hello@muaha.example',
                  },
                  {
                    id: 'partner-phone',
                    name: 'phone',
                    label: 'Phone',
                    type: 'tel',
                    value: '+84 28 3822 0042',
                  },
                ]}
                submitLabel="Save partner"
              />
            }
          />
        }
        aside={
          <Section
            title="Record context"
            body={<Stack gap="compact" items={['Customer since 2023', '6 delivery addresses']} />}
          />
        }
        asideLabel="Partner context"
      />
    )

    #Dashboard page

    The canonical overview hierarchy: durable context, compact identity, primary action and an uninterrupted analytical canvas.

    Sales / Overview

    Commercial workspace

    Sales overview

    Quotations

    24

    5 new today

    Sent

    9

    Awaiting a reply

    Confirmed

    18

    82,000,000 ₫

    To invoice

    6

    Needs attention

    Sales flow

    1. Quotation24
    2. Sent9
    3. Confirmed18
    4. To invoice6
    Show codeHide code
    import { Button, DashboardPage, Grid, Metric, Pipeline, Stack, Surface } from 'faifo-design'
    
    export const Example = () => (
      <DashboardPage
        variant="operational"
        context="Sales / Overview"
        eyebrow="Commercial workspace"
        title="Sales overview"
        actions={<Button label="Create quotation" variant="primary" />}
        body={
          <Stack
            gap="loose"
            items={[
              <Grid
                columns={4}
                items={[
                  <Metric label="Quotations" value={24} detail="5 new today" />,
                  <Metric label="Sent" value={9} detail="Awaiting a reply" tone="info" />,
                  <Metric label="Confirmed" value={18} detail="82,000,000 ₫" tone="positive" />,
                  <Metric label="To invoice" value={6} detail="Needs attention" tone="warning" />,
                ]}
              />,
              <Surface
                title="Sales flow"
                body={
                  <Pipeline
                    label="Sales flow"
                    steps={[
                      { id: 'draft', label: 'Quotation', value: 24 },
                      { id: 'sent', label: 'Sent', value: 9, tone: 'info' },
                      { id: 'confirmed', label: 'Confirmed', value: 18, tone: 'positive' },
                      { id: 'invoice', label: 'To invoice', value: 6, tone: 'warning' },
                    ]}
                  />
                }
              />,
            ]}
          />
        }
      />
    )

    #Board page

    The canonical horizontal workspace: durable context, compact identity, global controls and an uninterrupted board canvas.

    CRM / Pipeline

    Pipeline

    Sales opportunities

    Qualified

    125,000,000 ₫
    8 opportunities

    Proposal

    94,000,000 ₫
    5 opportunities

    Negotiation

    62,000,000 ₫
    3 opportunities
    Show codeHide code
    import { ActionGroup, BoardPage, Button, ContentCard, Grid, LinkButton } from 'faifo-design'
    
    export const Example = () => (
      <BoardPage
        variant="operational"
        context="CRM / Pipeline"
        eyebrow="Pipeline"
        title="Sales opportunities"
        actions={<Button label="Create opportunity" variant="primary" />}
        controls={
          <ActionGroup
            label="Board controls"
            actions={[
              <LinkButton label="My opportunities" href="#board-page" size="compact" />,
              <LinkButton label="All teams" href="#board-page" size="compact" variant="tertiary" />,
            ]}
          />
        }
        body={
          <Grid
            columns={3}
            items={[
              <ContentCard title="Qualified" meta="8 opportunities" body="125,000,000 ₫" />,
              <ContentCard title="Proposal" meta="5 opportunities" body="94,000,000 ₫" />,
              <ContentCard title="Negotiation" meta="3 opportunities" body="62,000,000 ₫" />,
            ]}
          />
        }
      />
    )

    #API

    Generated from the package source. A property without a description has none in the source yet.

    #FormPageComponent

    Deprecated Use RecordPage. Retained while application call sites migrate.

    PropertyDescriptionTypeDefault
    titlerequired–string–
    bodyrequired–JSXChild–
    context–JSXChild–
    variant–'operational'–
    width–'default' | 'wide'–
    scope–string | null–
    status–JSXChild–
    actions–JSXChild–
    meta–JSXChild–
    pathWhere the record stands in its process (a StagePath). It belongs to the record's identity, so it is the header's last row and the header owns its spacing; controller is for a working editor below it.JSXChild–
    controller–JSXChild–
    navigation–JSXChild–
    aside–JSXChild–
    asideLabel–string | null–
    asideWhenStackedWhere the rail goes once the page stacks into one column. after (default) follows the record; before leads it, for a rail of blockers the reader must see first. A leading rail also comes first in the document, so focus and reading order match what a narrow screen shows; a wide page still places it in the rail column.'after' | 'before'–
    asideBreakpointKeep a wide editing region: stack the rail through 91.5rem of page width.'wide'–
    slots–RecordPageSlots–

    #DashboardPageComponent

    Deprecated Compose the overview recipe with WorkspacePage layout="flow".

    The baseline for KPI, workflow and analytical overview screens. Applications own the translated copy, business actions and dashboard blocks. This pattern keeps location, identity and the overview canvas in a stable, compact hierarchy without pretending that the dashboard is a business record.

    PropertyDescriptionTypeDefault
    titlerequired–string–
    bodyrequired–JSXChild–
    context–JSXChild–
    variant–'operational'–
    eyebrow–string | null–
    status–JSXChild–
    meta–JSXChild–
    actions–JSXChild–
    masterMaster-detail: the items to work through (usually a ResourceList with currentId), shown beside body, which works on the current one. Side by side while the detail keeps more than 60% of the width and the 38rem a table needs; stacked, master first, when it would not.JSXChild–
    masterLabelNames the master region, e.g. "Unmatched transactions". Required with master.string–

    #BoardPageComponent

    Deprecated Compose canvas recipes with WorkspacePage layout="canvas".

    The baseline for kanban, schedule and timeline workspaces. A board needs more horizontal room than a collection or form, but it still belongs to the same application hierarchy. The pattern keeps location, identity and global controls in stable compact bands while leaving scrolling, columns and interaction to the specialised board supplied by the application.

    PropertyDescriptionTypeDefault
    titlerequired–string–
    bodyrequired–JSXChild–
    context–JSXChild–
    variant–'operational'–
    eyebrow–string | null–
    status–JSXChild–
    meta–JSXChild–
    actions–JSXChild–
    controls–JSXChild–
    masterMaster-detail: the items to work through (usually a ResourceList with currentId), shown beside body, which works on the current one. Side by side while the detail keeps more than 60% of the width and the 38rem a table needs; stacked, master first, when it would not.JSXChild–
    masterLabelNames the master region, e.g. "Unmatched transactions". Required with master.string–

    #Types

    #FormPageProps

    The properties of FormPage, listed above.

    #FormPageSlots

    PropertyDescriptionTypeDefault
    headerrequired–string–
    bodyrequired–string–
    fragmentTitle–string–

    #DashboardPageProps

    The properties of DashboardPage, listed above.

    #BoardPageProps

    The properties of BoardPage, 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.

    • form-page
    • form-page-context
    • form-page-header
    • form-page-title-row
    • form-page-heading
    • form-page-title
    • form-page-subline
    • form-page-status
    • form-page-actions
    • form-page-meta
    • form-page-path
    • form-page-controller
    • form-page-navigation
    • form-page-layout
    • form-page-body
    • form-page-aside
    • dashboard-page
    • dashboard-page-context
    • dashboard-page-header
    • dashboard-page-heading
    • dashboard-page-eyebrow
    • dashboard-page-title-row
    • dashboard-page-title
    • dashboard-page-subline
    • dashboard-page-status
    • dashboard-page-actions
    • dashboard-page-meta
    • dashboard-page-body
    • board-page
    • board-page-context
    • board-page-header
    • board-page-heading
    • board-page-eyebrow
    • board-page-title-row
    • board-page-title
    • board-page-subline
    • board-page-status
    • board-page-actions
    • board-page-meta
    • board-page-toolbar
    • board-page-controls
    • board-page-body