Skip to content
Browse docs and components

App Shell

app-shell

The frame of an app: a sidebar of sections and nav items, a header bar, a page header and a scrolling content column. On narrow screens the sidebar becomes a sheet in a native modal dialog.

Responsive

Install

$npxshadcnadd@forme/app-shell

Adds the component, its registry dependencies, and the token stylesheet you import once.

API reference

Read from the source, so it is the API of the file you install. A prop marked * is required.

AppSidebarSection

A titled run of nav items.

PropTypeDefaultDescription
titleReactNode—

Also takes every prop of <div> attributes.

AppNavItem

PropTypeDefaultDescription
activeboolean—The page this item is for is the one on screen.
iconReactNode—
badgeReactNode—A count on the right: unread, open, new.
asElementType"a"The link component, e.g. Next's Link. A plain <a> by default.

Also takes every prop of <a> attributes.

AppPageHeader

PropTypeDefaultDescription
title*ReactNode—
descriptionReactNode—
actionsReactNode—Buttons on the right, wrapping under the title on narrow screens.

Also takes every prop of <div> attributes.

The other parts

  • AppSidebarHeaderTakes <div> attributes
  • AppSidebarNavTakes <nav> attributes
  • AppSidebarFooterTakes <div> attributes
  • AppHeaderTakes <header> attributes
  • AppContentTakes <main> attributes