Page Shell
<base-page-shell> is a Pro content shell for mobile-ready webpages: a main area flanked by a left panel, a right panel, or both. Panels are hidden by default at every viewport and open on demand from the header toggles — on mobile as focus-trapped drawers over a backdrop, on desktop by pushing the full-width content sideways without narrowing it.
Unlock it plus 85 pro blocks, widgets & layouts — $99 one-time. Lifetime updates, 14-day money-back guarantee.
Live demo
Choose which panels to project, then open them with the panel buttons in the header. On desktop the content is pushed aside at full width; switch to the mobile preview where the panels become drawers over a backdrop.
Guides
Getting started
This is the main scrollable area. Project your article, docs, or marketing content here. The side panels keep navigation and context close without crowding the reading column.
The panels are hidden by default. Open them with the panel buttons in the header — the content keeps its full width and is pushed aside on desktop, while on mobile the panel slides over it as a drawer. Press Escape or tap the backdrop to dismiss.
HTML
Left, right, or both
Project one <base-page-shell-sidebar> per side you need — the side input places it at the correct edge. Add a matching <base-page-shell-toggle side="..."> in the header for each panel; panels stay hidden until toggled open. Tune the panel width with [width] — the content push on desktop follows it automatically.
HTML
When to use
- Docs, blogs, and marketing pages with contextual side panels.
- Reading layouts with a table of contents on either edge.
- Prefer
<base-dashboard-shell>for apps with persistent icon navigation. - Prefer the free
<base-sidenav>for docs hubs and section navigation.
Installation
Run the following command to add this shell to your project:
bash
npx base-ui-cli add page-shell
API Reference
Base UI provides standalone components. Import the exact elements you want to use into your component.
typescript (Example)
import { PageShellComponent, PageShellContentComponent, PageShellHeaderComponent, PageShellSidebarComponent, PageShellToggleComponent } from '@lussos/base-ui';
@Component({
selector: 'app-your-component',
imports: [
PageShellComponent,
PageShellContentComponent,
PageShellHeaderComponent,
PageShellSidebarComponent,
PageShellToggleComponent
],
template: `...`
})
export class YourComponent {} Properties for page-shell — generated from JSDoc in the library source.
| Selector | Property | Type | Default | Description |
|---|---|---|---|---|
base-page-shell | class | string | '' | Extra host classes merged via `cn()`. |
base-page-shell | layout | ShellLayoutMode | 'auto' | Chrome mode. `auto` follows the viewport `lg` breakpoint; `mobile` / `desktop` force that chrome (useful for narrow demos). |
base-page-shell-content | — | — | — | Scrollable main area for `base-page-shell`. Stays full width at every viewport; when a panel opens on desktop chrome the content is pushed sideways by the panel width instead of being narrowed. |
base-page-shell-content | class | string | '' | Extra host classes merged via `cn()`. |
base-page-shell-header | — | — | — | Top bar for `base-page-shell`. Project your brand, title, and `base-page-shell-toggle` buttons here. |
base-page-shell-header | class | string | '' | Extra host classes merged via `cn()`. |
base-page-shell-sidebar | class | string | '' | Extra host classes merged via `cn()`. |
base-page-shell-sidebar | side | PageShellSide | 'left' | Which edge the panel occupies: `left` (default) or `right`. |
base-page-shell-sidebar | width | number | 280 | Panel width in px. |
base-page-shell-toggle | class | string | '' | Extra host classes merged via `cn()`. |
base-page-shell-toggle | side | PageShellSide | 'left' | Which panel this toggle opens: `left` (default) or `right`. |
On this page