Thrive Design System

Layout

PageSection

A layout component for page headers with breadcrumb navigation, titles, action buttons, and wizard step indicators

Installation

npm install @thrivecart/ui
yarn add @thrivecart/ui
pnpm add @thrivecart/ui
bun add @thrivecart/ui

Usage

Import the PageSection components from the package:

import { PageSection, PageSectionWizard } from '@thrivecart/ui';

Examples

Basic Page Title

Simple Title

Display a standalone page title

Dashboard

<div className="w-full border border-border rounded-lg overflow-hidden">
			<PageSection pageTitle="Dashboard" />
		</div>

With Breadcrumbs

Breadcrumb Navigation

Show hierarchical navigation with breadcrumbs

Website Redesign

<div className="w-full border border-border rounded-lg overflow-hidden">
			<PageSection
				breadcrumbs={[
					{ label: 'Home', href: '#' },
					{ label: 'Projects', href: '#' },
					{ label: 'Website Redesign' },
				]}
			/>
		</div>

With Actions

Action Buttons

Add primary and secondary action buttons

User Management

ImportExport
<div className="w-full border border-border rounded-lg overflow-hidden">
			<PageSection
				pageTitle="User Management"
				primaryAction={{ label: 'Add User', onClick: () => {} }}
				secondaryActions={[
					{ label: 'Import', onClick: () => {} },
					{ label: 'Export', onClick: () => {} },
				]}
				otherActions={[
					{ label: 'Settings', onClick: () => {} },
					{ label: 'Help', onClick: () => {} },
				]}
			/>
		</div>

Actions on Breadcrumb

Add contextual actions to the last breadcrumb item

Summer Sale Campaign

<div className="w-full border border-border rounded-lg overflow-hidden">
			<PageSection
				breadcrumbs={[
					{ label: 'Campaigns', href: '#' },
					{
						label: 'Summer Sale Campaign',
						actions: [
							{ label: 'Rename', icon: <MdOutlineEdit />, onClick: () => {} },
							{ label: 'Duplicate', icon: <MdOutlineCopyAll />, onClick: () => {} },
							{ label: 'Archive', icon: <MdOutlineArchive />, onClick: () => {} },
							{ label: 'Delete', icon: <MdOutlineDelete />, isDelete: true, onClick: () => {} },
						],
					},
				]}
				primaryAction={{ label: 'Save Changes', onClick: () => {} }}
			/>
		</div>

Wizard Variant

PageSectionWizard is designed for multi-step form flows with editable titles and step indicators.

Basic Wizard

Wizard Header

Step indicator for multi-step forms

Create Campaign

<SidebarProvider mainNavItems={[]} config={{ defaultSecondaryOpen: false }}>
			<div className="w-full border border-border rounded-lg overflow-hidden">
				<PageSectionWizard
					title="Create Campaign"
					currentStep={1}
					totalSteps={4}
					steps={[
						{ id: 'details', label: 'Details' },
						{ id: 'content', label: 'Content' },
						{ id: 'audience', label: 'Audience' },
						{ id: 'review', label: 'Review' },
					]}
				/>
			</div>
		</SidebarProvider>

Editable Title

Editable Wizard Title

Allow users to edit the wizard title inline

My New Campaign

<SidebarProvider mainNavItems={[]} config={{ defaultSecondaryOpen: false }}>
			<div className="w-full border border-border rounded-lg overflow-hidden">
				<PageSectionWizard
					title={title}
					onTitleChange={setTitle}
					onTitleChangeEnd={(newTitle) => console.log('Saved:', newTitle)}
					titlePlaceholder="Untitled Campaign"
					currentStep={0}
					totalSteps={3}
					steps={[
						{ id: 'details', label: 'Details' },
						{ id: 'content', label: 'Content' },
						{ id: 'review', label: 'Review' },
					]}
				/>
			</div>
		</SidebarProvider>

With Step Navigation

Clickable Steps

Click completed steps to navigate back

Campaign Builder

<SidebarProvider mainNavItems={[]} config={{ defaultSecondaryOpen: false }}>
			<div className="w-full border border-border rounded-lg overflow-hidden">
				<PageSectionWizard
					title="Campaign Builder"
					currentStep={currentStep}
					totalSteps={steps.length}
					steps={steps}
					onStepClick={setCurrentStep}
				/>
			</div>
		</SidebarProvider>

Simple Step Counter

Step Counter

Minimal step indicator without labels

Setup Wizard

Step 3 of 5
<SidebarProvider mainNavItems={[]} config={{ defaultSecondaryOpen: false }}>
			<div className="w-full border border-border rounded-lg overflow-hidden">
				<PageSectionWizard
					title="Setup Wizard"
					currentStep={2}
					totalSteps={5}
				/>
			</div>
		</SidebarProvider>

Custom Steps Content

Custom Steps Area

Replace step indicators with custom content

Import Contacts

<SidebarProvider mainNavItems={[]} config={{ defaultSecondaryOpen: false }}>
			<div className="w-full border border-border rounded-lg overflow-hidden">
				<PageSectionWizard
					title="Import Contacts"
					stepsContent={
						<div className="flex items-center gap-2">
							<Button variant="secondary" size="sm">Cancel</Button>
							<Button variant="primary" size="sm">Import 234 Contacts</Button>
						</div>
					}
				/>
			</div>
		</SidebarProvider>

Best Practices

Use breadcrumbs for deep navigation

Always provide breadcrumbs when users can navigate multiple levels deep in the hierarchy.

Limit visible actions

Show at most 1-2 primary actions. Use the overflow menu for additional actions.

Make primary action prominent

The primary action should be the most important action on the page.

Use wizard for multi-step flows

Use PageSectionWizard when guiding users through a sequential process.

Don't use long breadcrumb labels

Keep breadcrumb labels concise. Truncate if necessary.

Don't mix page header styles

Use one consistent page header pattern throughout your application.

Props

PageSection

PropTypeDefaultDescription
pageTitlestring-Standalone page title (alternative to breadcrumbs)
breadcrumbsPageSectionBreadcrumbItem[]-Array of breadcrumb items
primaryActionPageSectionActionItem-Primary CTA button configuration
secondaryActionsPageSectionSecondaryActionItem[]-Secondary action buttons
otherActionsPageSectionActionItem[]-Overflow menu actions
showSidebarTogglebooleantrueShow sidebar toggle when sidebar is collapsed
classNamestring-Additional className

PageSectionWizard

PropTypeDefaultDescription
titlestring-Wizard title
onTitleChange(newTitle: string) => void-Makes title editable when provided
onTitleChangeEnd(newTitle: string) => void-Called when title editing ends
titlePlaceholderstring'Untitled'Placeholder when title is empty
currentStepnumber-Current step index (0-based)
totalStepsnumber-Total number of steps
stepsWizardStepItem[]-Array of step definitions
onStepClick(stepIndex: number) => void-Called when a step is clicked
showSidebarTogglebooleantrueShow sidebar toggle when sidebar is collapsed
stepsContentReactNode-Custom content for steps area

Accessibility

Navigation Landmarks

PageSection uses proper semantic HTML with navigation landmarks for breadcrumbs and heading elements for titles.

  • Breadcrumbs use <nav> with proper ARIA labels
  • Action buttons are keyboard accessible
  • Editable titles support keyboard interaction (Enter to submit, Escape to cancel)
  • Step indicators communicate current progress to screen readers