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*ReactNodeMain 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
classNamestringAdditional 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*ReactNodeTopBar 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
classNamestringAdditional CSS classes

AppShell.Sidebar

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

PropTypeDefaultDescription
children*ReactNodeThe Sidebar component instance
classNamestringAdditional CSS classes

AppShell.Header

Sticky or static header area with entry animation.

PropTypeDefaultDescription
children*ReactNodeHeader content
stickybooleantrueWhether the header is sticky
classNamestringAdditional CSS classes

AppShell.Main

Main content area with entry animation.

PropTypeDefaultDescription
children*ReactNodeMain area content
classNamestringAdditional CSS classes

AppShell.Footer

Sticky or static footer area with entry animation.

PropTypeDefaultDescription
children*ReactNodeFooter content
stickybooleanfalseWhether the footer is sticky
classNamestringAdditional CSS classes