Studio workspace
LiveDashboard
App chrome, content rail and regions move together.
Orders
Drafts
Revenue
Controls
Composable application layout primitives for sidebars, navbars and bounded page content.
Component
import {
AppShell,
AppShellBody,
AppShellContent,
AppShellMain,
AppShellNavbar,
AppShellSidebar,
} from "@swirski/ui";AppShell
|-- AppShellSidebar
`-- AppShellBody
|-- AppShellNavbar
`-- AppShellMain
`-- AppShellContentControls
<AppShell>
<AppShellSidebar
aria-label="Workspace navigation"
side="left"
width="md"
>
<nav>...</nav>
</AppShellSidebar>
<AppShellBody>
<AppShellNavbar>Studio workspace</AppShellNavbar>
<AppShellMain>
<AppShellContent width="lg">
Page content
</AppShellContent>
</AppShellMain>
</AppShellBody>
</AppShell>| Prop | Type | Default | Notes |
|---|---|---|---|
AppShell.asChild | boolean | false | Renders the child as the root shell element. |
AppShell.childrenRequired | ReactNode | - | Composed shell regions, usually sidebar and body. |
AppShell.size | 'sm' | 'md' | 'lg' | "md" | Controls shared spacing and navbar height. |
AppShell.tone | 'default' | 'white' | 'black' | "default" | Applies the root shell surface treatment. |
AppShell.variant | 'default' | 'compact' | "default" | Switches between regular and denser shell chrome. |
AppShellSidebar.asChild | boolean | false | Renders the child as the root element. |
AppShellSidebar.childrenRequired | ReactNode | - | Shell content or composed AppShell regions. |
AppShellSidebar.collapseBelow | 'md' | 'lg' | 'never' | "md" | Viewport where the sidebar is hidden below. |
AppShellSidebar.side | 'left' | 'right' | "left" | Places the sidebar on either side of the shell. |
AppShellSidebar.size | 'sm' | 'md' | 'lg' | "md" | Controls shell spacing and region height. |
AppShellSidebar.sticky | boolean | true | Pins the sidebar during page scrolling. |
AppShellSidebar.tone | 'default' | 'white' | 'black' | "default" | Applies the shell surface treatment. |
AppShellSidebar.variant | 'default' | 'compact' | "default" | Controls the density of shell chrome. |
AppShellSidebar.width | 'sm' | 'md' | 'lg' | "md" | Controls the responsive sidebar width. |
AppShellBody.asChild | boolean | false | Renders the child as the root element. |
AppShellBody.childrenRequired | ReactNode | - | Shell content or composed AppShell regions. |
AppShellBody.size | 'sm' | 'md' | 'lg' | "md" | Controls shell spacing and region height. |
AppShellBody.tone | 'default' | 'white' | 'black' | "default" | Applies the shell surface treatment. |
AppShellBody.variant | 'default' | 'compact' | "default" | Controls the density of shell chrome. |
AppShellNavbar.asChild | boolean | false | Renders the child as the root element. |
AppShellNavbar.childrenRequired | ReactNode | - | Shell content or composed AppShell regions. |
AppShellNavbar.size | 'sm' | 'md' | 'lg' | "md" | Controls shell spacing and region height. |
AppShellNavbar.sticky | boolean | true | Pins the navbar to the top edge while scrolling. |
AppShellNavbar.tone | 'default' | 'white' | 'black' | "default" | Applies the shell surface treatment. |
AppShellNavbar.variant | 'default' | 'compact' | "default" | Controls the density of shell chrome. |
AppShellMain.asChild | boolean | false | Renders the child as the root element. |
AppShellMain.childrenRequired | ReactNode | - | Shell content or composed AppShell regions. |
AppShellMain.size | 'sm' | 'md' | 'lg' | "md" | Controls shell spacing and region height. |
AppShellMain.tone | 'default' | 'white' | 'black' | "default" | Applies the shell surface treatment. |
AppShellMain.variant | 'default' | 'compact' | "default" | Controls the density of shell chrome. |
AppShellContent.asChild | boolean | false | Renders the child as the root element. |
AppShellContent.childrenRequired | ReactNode | - | Shell content or composed AppShell regions. |
AppShellContent.size | 'sm' | 'md' | 'lg' | "md" | Controls shell spacing and region height. |
AppShellContent.tone | 'default' | 'white' | 'black' | "default" | Applies the shell surface treatment. |
AppShellContent.variant | 'default' | 'compact' | "default" | Controls the density of shell chrome. |
AppShellContent.width | 'sm' | 'md' | 'lg' | 'xl' | 'full' | "lg" | Controls the maximum width of the content rail. |