Skip to main content
Brand and assets
Build
Monitor and contribute
/
Patterns & layouts
  • Overview
  • Layouts
  • PageLayout
  • FullPageLayout
  • Patterns
  • Forms & density
  • Composition (asChild)
  • Rich components
  • DataTable
    • useDataTable
    • DataTable
    • Examples
  • FullPageLayout

FullPageLayout

CustomerDashboardFullPageLayout is a full-page shell for focused flows — typically multi-step forms such as adding a dependent or onboarding a company. It renders an opinionated header (title, subtitle and a close button) and an optional fixed footer, with your flow content in between.

It builds on Murray's FullPageLayout and is the customer-dashboard equivalent of a full-width modal.

  • Import: import { CustomerDashboardFullPageLayout } from "@alan-eu/global-customer-dashboard/shared-layout/FullPageModalLayout";
  • Source: frontend/shared/global-customer-dashboard/shared-layout/FullPageModalLayout.tsx
  • Storybook: browse the stories

Basic usage​

<CustomerDashboardFullPageLayout
title="Add a dependent"
subtitle="Step 1 of 3"
onClose={() => navigate("..")}
>
<DependentForm />
</CustomerDashboardFullPageLayout>

Props​

PropTypeDescription
titlestring | (() => string)Header title. Pass a function only when it must be evaluated at render time.
subtitlestring | (() => string)Optional subtitle shown under the title (e.g. a step indicator).
onClose() => voidCalled when the header close button is clicked.
closeLabelstring | (() => string)Close button label. Defaults to a generic "Close".
variant"fluid" | "fixed"Forwarded to the content area. Use "fixed" for a narrower layout. Defaults to fluid.
span8 | 12Constrains the inner column width. Pass 8 for an 8/12 column; defaults to 12 (full width).

Footer​

Render footer actions (e.g. a "Continue" button) with the footer slot:

<CustomerDashboardFullPageLayout title="Add a dependent" subtitle="Step 3 of 3">
<DependentForm />
<CustomerDashboardFullPageLayout.SlotContent name="footer">
<Button>Continue</Button>
</CustomerDashboardFullPageLayout.SlotContent>
</CustomerDashboardFullPageLayout>

Handling close from a descendant​

When the close handler lives deeper than the component declaring the layout, register it with the useOnClose hook instead of passing onClose:

const StepContent = () => {
useOnClose(() => confirmDiscardChanges());
return <DependentForm />;
};

Both onClose and any handler registered via useOnClose run when the close button is clicked.

Edit this page
Previous
PageLayout
Next
Forms & density
  • Basic usage
  • Props
  • Footer
  • Handling close from a descendant