ThemedLayout
The main layout component that combines sidebar, header, and content area.Basic Usage
- Ant Design
- Material UI
- Mantine
- Chakra UI
Props
| Prop | Type | Description |
|---|---|---|
Sider | React.FC | Custom sidebar component |
Header | React.FC | Custom header component |
Title | React.FC | Custom title/logo component |
Footer | React.FC | Custom footer component |
OffLayoutArea | React.FC | Component rendered outside the main layout |
initialSiderCollapsed | boolean | Initial collapsed state of sidebar |
Custom Layout
You can customize individual parts of the layout:Sider
The sidebar component displays navigation menu and branding.Features
- Automatic menu generation from resources
- Collapsible on desktop
- Drawer mode on mobile
- Active route highlighting
- Icon support
- Nested menu support
Basic Usage
- Ant Design
- Material UI
Props
| Prop | Type | Description |
|---|---|---|
Title | React.FC | Custom title component |
render | function | Custom render function for menu items |
fixed | boolean | Fixed position sidebar (Ant Design) |
meta | object | Meta information for menu items |
Custom Menu Items
Add custom items to the sidebar menu:Header
The header component displays the top navigation bar.Features
- User menu
- Notifications
- Search
- Breadcrumb navigation
- Responsive design
Basic Usage
- Ant Design
- Material UI
Props
| Prop | Type | Description |
|---|---|---|
sticky | boolean | Sticky header on scroll |
Custom Header
Create a completely custom header:Title
The title component displays your application logo and name.Basic Usage
- Ant Design
- Material UI
Props
| Prop | Type | Description |
|---|---|---|
collapsed | boolean | Sidebar collapsed state |
text | string | Application name |
icon | ReactNode | Application logo |
Breadcrumb
Automatic breadcrumb navigation based on current route.Basic Usage
- Ant Design
- Material UI
Custom Breadcrumb
Responsive Behavior
All layout components are responsive by default:- Desktop: Full sidebar, sticky header
- Tablet: Collapsible sidebar
- Mobile: Drawer sidebar, compact header
Controlling Sidebar State
Off-Layout Area
Render components outside the main layout (e.g., floating buttons):Best Practices
- Consistent Branding: Use the same logo and colors throughout the layout
- Clear Navigation: Group related resources in the sidebar
- Responsive Testing: Test on different screen sizes
- Accessibility: Ensure keyboard navigation works
- Performance: Lazy load heavy components in the sidebar
Examples
Multi-Level Menu
Dark Mode Toggle
Next Steps
CRUD Components
Build data interfaces
Button Components
Learn about action buttons
Theming
Customize your layout theme
Examples
See complete examples