Skip to main content

App Shell

A composable application shell layout coordinating Sidebar, Header, Main content, and Footer areas with synchronized entry animations and fixed/floating variants.

Installation

$ npx shadcn@latest add @orecus/app-shell
Dependencies:
motion
Registry:
@orecus/sidebar@orecus/color-utils

Component

Main Content Area

Props

PropTypeDefaultDescription
children*ReactNode—Main layout content (AppShell.TopBar, AppShell.Sidebar, AppShell.Header, AppShell.Main, AppShell.Footer)
variant'sidebar-inline' | 'sidebar-floating''sidebar-inline'Layout variant - inline keeps sidebar in document flow, floating adds visual separation
sidebarType'normal' | 'subtle' | 'strong' | 'solid' | 'none''solid'Glass type for sidebar and TopBar styling
sidebarInvertbooleanfalseInvert sidebar and TopBar glass styling
classNamestring—Additional CSS classes for the root container

Compound Components

AppShell.TopBar

Thin bar at top of content area with floating children container. Creates inverted corner effect at sidebar junction.

PropTypeDefaultDescription
children*ReactNode—TopBar content (typically action buttons, user avatar)
heightnumber6Height of the thin connecting line in pixels
radius'sm' | 'md' | 'lg' | 'xl''lg'Border radius size for the inverted corner
classNamestring—Additional CSS classes

AppShell.Sidebar

Wrapper for the Sidebar component. Handles responsive visibility and layout positioning.

PropTypeDefaultDescription
children*ReactNode—The Sidebar component instance
classNamestring—Additional CSS classes

AppShell.Header

Sticky or static header area with entry animation.

PropTypeDefaultDescription
children*ReactNode—Header content
stickybooleantrueWhether the header is sticky
classNamestring—Additional CSS classes

AppShell.Main

Main content area with entry animation.

PropTypeDefaultDescription
children*ReactNode—Main area content
classNamestring—Additional CSS classes

AppShell.Footer

Sticky or static footer area with entry animation.

PropTypeDefaultDescription
children*ReactNode—Footer content
stickybooleanfalseWhether the footer is sticky
classNamestring—Additional CSS classes