Application Shell
Sidebar Shell
NewAn app frame of two cards: a sidebar with search and grouped links, and a content card, under a top bar with account and project switchers.
Built from Glide Select, Notification Bell, Search Input and Switcher Dropdown — installed with it.
npx motionsnack add sidebar-shellCustomize
<SidebarShell />Props
30 properties
| Property | Type | Default | Description |
|---|---|---|---|
| groups | { label?: string; picker?: { options: { value: string; label: string }[]; defaultValue?: string; icon?: SidebarShellIcon }; items: { value?: string; label: string; icon?: SidebarShellIcon; href?: string; badge?: string; children?: SidebarShellItem[] }[] }[] | 2 demo groups | Navigation in groups, each with an optional select above its links. An empty or '#' href renders a button; children nest one level. |
| accounts | SwitcherDropdownItem[] | 2 demo accounts | Accounts in the first pill of the top bar (Switcher Dropdown). An empty array hides it. |
| projects | SwitcherDropdownItem[] | 3 demo projects | Projects in the second pill. An empty array hides it. |
| logo | { src: string; alt?: string } | - | Logo picture in the mark instead of the letter. |
| promo | { title: string; body?: string; cta?: { label: string; href?: string } } | Upgrade to Pro | Card at the bottom of the sidebar. An empty title hides it. |
| notifications | { title: string; body?: string; time?: string; unread?: boolean }[] | 3 demo notifications | Items of the notifications panel (Notification Bell). An empty array hides the bell. |
| value | string | - | Controlled current item (its value). `active` is a deprecated alias. |
| defaultValue | string | first item | Current item on first render when uncontrolled. `defaultActive` is a deprecated alias. |
| onChange | (value: string) => void | - | Called with the value of the item the user picked. `onNavigate` is a deprecated alias. |
| collapsed | boolean | - | Controlled collapsed state of the desktop sidebar (a 64px rail). |
| onCollapsedChange | (collapsed: boolean) => void | - | Called when the user collapses or expands the sidebar (toggle or Cmd/Ctrl+B). |
| linkComponent | ElementType | 'a' | Renders every item link, e.g. the app's router link. |
| banner | ReactNode | - | App banner above the top bar. |
| start | ReactNode | - | Extra controls in the top bar after the switchers. |
| end | ReactNode | - | Extra controls in the top bar before the bell. |
| labels | SidebarShellLabels | English | UI strings: skip link, menu, collapse / expand, More. |
| accent | string | - | Colour of the promo icon. Without it: the idle icon colour (D14). |
| onSearch | (query: string) => void | - | Called on every keystroke in the search field. |
| children | ReactNode | - | Page content rendered in the content card under the headline. |
| height | number | - | Fixed height in px. Without it the shell fills the screen (100dvh). |
| buttonColor | string | - | Fill of the promo button. Without it: zinc-900 / zinc-100. |
| buttonTextColor | string | - | Text of the promo button. |
| className | string | '' | Extra classes on the root. |
| brandName | string | 'Northwind' | The letter in the logo mark. |
| searchPlaceholder | string | 'Search...' | Empty hides the search field. |
| searchShortcut | string | '/' | Key that focuses the search. Empty turns it off. |
| defaultCollapsed | boolean | false | Desktop sidebar starts as a 64px rail. |
| showTitle | boolean | true | Headline of the active page at the top of the content card. |
| background | string | '#000000' | Base colour behind the cards. |
| surfaceColor | string | '#09090b' | Colour of the content card. |
About Sidebar Shell
Sidebar Shell is the frame a dashboard or SaaS app lives in, built from the library's own components. The top bar carries the logo and two Switcher Dropdown pills for the account and the project, plus a Notification Bell with a red dot and a panel of notifications. Below it the sidebar sits in its own rounded card: a Search Input that the / key jumps to, links in titled groups with icons and counters, an optional Glide Select above any group (a team, an environment) and a promo card at the bottom. Navigation rows have the size, corners and highlight of the options in the library's dropdowns, and the active one glides to whichever link you pick. Your pages render in the content card next to it; on phones and tablets the sidebar slides in as a drawer. Navigation works controlled or uncontrolled, links can be real URLs.
What's included
- Built from Search Input, Glide Select, Switcher Dropdown and Notification Bell
- Top bar with account and project switchers
- Sidebar card with search, grouped links and an optional picker
- Rows sized like dropdown options, active row glides on a spring
- Notifications panel with unread dots and mark all as read
- Promo card at the bottom of the sidebar
- Drawer sidebar on phones and tablets, light and dark looks
- Type
- React app shell for dashboards and SaaS apps
- Library
- Application UI · Application Shell
- Stack
- Next.js, React, Tailwind CSS, Framer Motion