AppShell
The frame of a full dashboard view.
import {
AppShell,
AppShellContent,
NavRail,
NavRailContent,
NavRailItem,
Page,
PageHeader,
PageTitle,
ResizableHandle,
ResizablePanel,
ResizablePanelGroup,
Sidebar,
SidebarHeader,
SidebarInset,
Text
} from 'alinea/components'
import {LucideFile, LucideImage} from 'alinea/dashboard/icons'
export function AppShellExample() {
return (
<div style={{width: 640, height: 320}}>
<AppShell>
<NavRail aria-label="Roots">
<NavRailContent>
<NavRailItem icon={LucideFile} label="Pages" active />
<NavRailItem icon={LucideImage} label="Media" />
</NavRailContent>
</NavRail>
<AppShellContent>
<ResizablePanelGroup>
<ResizablePanel defaultSize={200} minSize={160} priority="low">
<Sidebar aria-label="Pages">
<SidebarHeader>
<Text weight="semibold">Oak & Loom</Text>
</SidebarHeader>
</Sidebar>
</ResizablePanel>
<ResizableHandle />
<ResizablePanel minSize={240} priority="high">
<SidebarInset>
<Page>
<PageHeader>
<PageTitle>Linen shirt</PageTitle>
</PageHeader>
</Page>
</SidebarInset>
</ResizablePanel>
</ResizablePanelGroup>
</AppShellContent>
</AppShell>
</div>
)
}Props
<AppShell>
The full height application layout: a NavRail next to the AppShellContent surface that holds the sidebars and pages.
PropTypeDefaultDescription
children*ReactNodeDefault –
Also accepts className and style, id and aria-* labelling attributes and data-* attributes.
<AppShellContent>
The raised surface next to the NavRail, rendered as the main landmark
PropTypeDefaultDescription
children*ReactNodeDefault –
Also accepts className and style, id and aria-* labelling attributes and data-* attributes.