React Shared Components

Interactive testing environment for react-shared components

Theme Playground

Current: Default

PageLayout

A page-level layout component with side-by-side or stacked modes for organizing header, content, and footer.

Interactive Playground

Customize the PageLayout properties and see the changes in real-time.

Enable sub-page mode

Jane's Store

Digital Products & Courses

🎨 Design
📚 Education

Product 1

Digital Download

$29

A comprehensive guide to mastering design principles and creating stunning visual content.

Product 2

Digital Download

$29

A comprehensive guide to mastering design principles and creating stunning visual content.

Product 3

Digital Download

$29

A comprehensive guide to mastering design principles and creating stunning visual content.

© 2024 Jane's Store. All rights reserved.

Full-Width Layout Examples

See how the layouts work at full width with realistic content.

Side by Side Layout

Header sticky on left (33% width on xl screens), content scrolls on right. Stacks vertically on mobile.

Creator Store

Premium Digital Products

CoursesTemplatesGuides

Product 1

$29

High-quality digital product designed to help you achieve your goals faster.

Product 2

$39

High-quality digital product designed to help you achieve your goals faster.

Product 3

$49

High-quality digital product designed to help you achieve your goals faster.

Product 4

$59

High-quality digital product designed to help you achieve your goals faster.

Made with ❤️ by Creator

Stacked Layout

Traditional vertical layout with header at top, content below. Better for mobile-first designs.

My Digital Shop

Exclusive content and resources

Featured Product 1

Discover amazing digital products that will transform your workflow and boost productivity.

$49

Featured Product 2

Discover amazing digital products that will transform your workflow and boost productivity.

$69

Featured Product 3

Discover amazing digital products that will transform your workflow and boost productivity.

$89

© 2024 Digital Shop

Sub Page Mode

For nested pages: hides header in stacked layout, reduces padding in side-by-side, forces secondary background.

Stacked + SubPage (Header Hidden)

Sub Page Content

Header is automatically hidden

More Content

Perfect for detail pages

Side by Side + SubPage (Reduced Padding)

Sub Page

Less top padding

Content Section

Reduced padding (xl:pt-8 vs xl:pt-14)

API Reference

Complete list of props and their descriptions.

PropTypeDefaultDescription
layout'side-by-side' | 'stacked''side-by-side'Page layout mode: side-by-side for sticky header, stacked for vertical layout
subPagebooleanfalseEnables sub-page mode: hides header in stacked layout, reduces padding in side-by-side
background'primary' | 'secondary''secondary'Background color (forced to 'secondary' when subPage is true)
headerReactNodeundefinedHeader content (sticky in side-by-side, hidden in stacked+subPage)
footerReactNodeundefinedFooter content displayed at bottom of content
childrenReactNodeundefinedMain page content
classNamestringundefinedAdditional CSS classes for the root container

Usage Notes

Side by Side Layout

In side-by-side mode, the header is positioned sticky on the left (33% width on xl screens) with full viewport height. The content scrolls independently on the right. On mobile, it stacks vertically.

Responsive Behavior

The layout is fully responsive. Side-by-side mode uses a grid that switches to single column on mobile (xl:grid-cols-[33%_1fr]). Header max-width is 500px on mobile, full width on desktop.

Theme Integration

The component respects theme configuration for layout mode through the useThemeLayout hook. Layout can be overridden by theme settings.

Content Constraints

Content has max-width of 800px in side-by-side mode, 1168px in stacked mode. The layout uses font-secondary class for typography.