dolfindevelopers

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.

Terminal
bunx --bun shadcn@4.23.0 add @dolfin/base-page

Usage

route.tsx
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

PropTypeDescription
childrenstring | 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.
classNamestring

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.tsx 93 lines