App shell API
Import
Section titled “Import”import { AppShell, AppShellBody } from '@cimpress-ui/react';Side nav integration
Section titled “Side nav integration”App shell handles wiring up the side nav to the app header and managing the open/close state for you. The app header will display a button for toggling the side nav on smaller screens, and the open/close state is managed for you automatically.
Accessibility notes
Section titled “Accessibility notes”App shell automatically renders a skip link that moves keyboard focus to AppShellBody. This helps keyboard users bypass repeated navigation chrome.
API reference
Section titled “API reference”AppShell
Section titled “AppShell”Provides the foundational layout structure for applications, including header, navigation, and main content slots.
AppShellProps
- ReactNode
children *
Section titled “ children * ” -
The children of the app shell should be composed using specific components to fill the available layout slots:
<AppHeader />for the global header<SideNav />for the side navigation<TopNav />for the top navigation bar<AppShellBody />for the main content area
These components should be passed as direct children to correctly populate the app shell layout.
- string
-
The element's unique identifier. See MDN.
- boolean
data-cim-style-root
Section titled “ data-cim-style-root ” -
Use this attribute to "claim" the component tree for exclusive Cimpress UI usage.
- string
UNSAFE_className
Section titled “ UNSAFE_className ” -
Sets the CSS className for the element. Only use as a last resort. Use style props instead.
See styling guide.
- CSSProperties
UNSAFE_style
Section titled “ UNSAFE_style ” -
Sets the CSS style for the element. Only use as a last resort. Use style props instead.
See styling guide.
AppShellBody
Section titled “AppShellBody”Renders the main content area within AppShell.
AppShellBodyProps
- ReactNode
children *
Section titled “ children * ” -
Main content area of the app shell.
- boolean
data-cim-style-root
Section titled “ data-cim-style-root ” -
Use this attribute to "claim" the component tree for exclusive Cimpress UI usage.
- string
UNSAFE_className
Section titled “ UNSAFE_className ” -
Sets the CSS className for the element. Only use as a last resort. Use style props instead.
See styling guide.
- CSSProperties
UNSAFE_style
Section titled “ UNSAFE_style ” -
Sets the CSS style for the element. Only use as a last resort. Use style props instead.
See styling guide.