Build a page with actions and a sidebar
Compose Page.Header, Page.Actions, and Page.Body into a React detail screen. Keep the content first in reading order while the summary moves beside it at larger widths.
Install the page frame
Start with React 19, TypeScript, Tailwind CSS 4, and an initialized shadcn project. Register the @layout-kit namespace, then install Page, Stack, and the shadcn card and button components.
npx shadcn@latest add @layout-kit/page @layout-kit/stack
npx shadcn@latest add card buttonThe installation guide covers aliases and registry setup. This example uses buttonVariants to style an actual in-page link; it needs no router, backend, or save handler.
Choose the page regions
Page constrains width and adds gutters. Page.Header provides a title, description, and action area. Page.Body holds the main region and an optional labeled aside.
Complete example
The action navigates to the delivery checklist. Replace the sample brief and summary with your own content, and give each instance unique fragment IDs if you render several on one page.
Storefront redesign
Make product discovery simpler while keeping the existing checkout.
Delivery checklist
- Review product navigation
- Check small-screen layouts
- Test keyboard navigation
import { Page } from "@/components/ui/page";
import { Stack } from "@/components/ui/stack";
import { buttonVariants } from "@/components/ui/button";
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
export function ProjectPage({ titleAs = "h1" }: { titleAs?: "h1" | "h2" }) {
const SectionTitle = titleAs === "h1" ? "h2" : "h3";
return (
<Page size="lg">
<Page.Header
title="Storefront redesign"
titleAs={titleAs}
description="Project brief and delivery checklist"
actions={
<Page.Actions>
<a href="#project-checklist" className={buttonVariants({ variant: "outline" })}>
View checklist
</a>
</Page.Actions>
}
/>
<Page.Body
asideWidth="sm"
asideBreakpoint="lg"
asideCollapse="stack"
asideLabel="Project summary"
aside={
<Card>
<CardHeader>
<CardTitle>Project summary</CardTitle>
<CardDescription>Sample project details</CardDescription>
</CardHeader>
<CardContent>
<p>Owner: Product team. Status: In progress.</p>
</CardContent>
</Card>
}
>
<Stack gap={6}>
<p>Make product discovery simpler while keeping the existing checkout.</p>
<Stack render={<section aria-label="Delivery checklist" />} gap={3}>
<SectionTitle
id="project-checklist"
className="scroll-mt-24 text-lg font-semibold"
tabIndex={-1}
>
Delivery checklist
</SectionTitle>
<Stack render={<ul />} gap={2}>
<li>Review product navigation</li>
<li>Check small-screen layouts</li>
<li>Test keyboard navigation</li>
</Stack>
</Stack>
</Stack>
</Page.Body>
</Page>
);
}Headings and reading order
Continue with the full Page API or add a responsive dashboard grid.