Page layout
PageFoundationsStandalone UI
PageContainer (one width for every page, or narrow for forms), PageHeader with title, description and an actions slot, Section and Eyebrow.
Page: A complete screen for one route, such as a bill or the invoices list. Mount it on a route in your app; connected SDK pages provide data and actions; standalone UI pages receive them as props. Pages vs components
Loading preview…
Installation
Needs the Dolfin registry token. The CLI copies the source into your app.
bunx --bun shadcn@4.23.0 add @dolfin/base-pageUsage
import type { ComponentProps } from "react";
import { PageContainer } from "@/components/dolfin/base/page-layout";
// Your controller supplies display values, state and callbacks. No SDK provider required.
export function Screen(props: ComponentProps<typeof PageContainer>) {
return <PageContainer {...props} />;
}No SDK provider or data fetching. Pass display values, state and callbacks from your application, GraphQL controller or SDK hooks.
API reference
| Prop | Type | Description |
|---|---|---|
children | string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re… | |
size | "default" | "narrow" | `narrow` is only for single-column forms; every other page keeps one width so navigation never shifts. |
className | string |
Customisation
Without editing the source, you can change:
- Class names
className
Or edit the installed file directly: it is your code. See theming for colours and fonts.
Files
Written to your app by the install command:
components/dolfin/base/page-layout.tsx93 lines