# App shell API

> Explore the API of Cimpress UI's app shell component.

Source: https://ui.cimpress.io/components/app-shell/api/

## Import

```tsx
import { AppShell, AppShellBody } from '@cimpress-ui/react';
```

## Side nav integration

App shell handles wiring up the [side nav](/components/side-nav) to the [app header](/components/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

App shell automatically renders a skip link that moves keyboard focus to `AppShellBody`. This helps keyboard users bypass repeated navigation chrome.

## API reference

### AppShell

Provides the foundational layout structure for applications, including header, navigation, and main content slots.

See [app shell usage guidelines](https://ui.cimpress.io/components/app-shell/).

**Props: `AppShellProps`**

- `children` (required): `ReactNode`

  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.

- `id`: `string`

  The element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).

- `data-cim-style-root`: `boolean`

  Use this attribute to "claim" the component tree for exclusive Cimpress UI usage.

- `UNSAFE_className`: `string`

  Sets the CSS className for the element. Only use as a **last resort**. Use style props instead.

  See [styling guide](https://ui.cimpress.io/dev-guides/styling/).

- `UNSAFE_style`: `CSSProperties`

  Sets the CSS style for the element. Only use as a **last resort**. Use style props instead.

  See [styling guide](https://ui.cimpress.io/dev-guides/styling/).

### AppShellBody

Renders the main content area within `AppShell`.

**Props: `AppShellBodyProps`**

- `children` (required): `ReactNode`

  Main content area of the app shell.

- `data-cim-style-root`: `boolean`

  Use this attribute to "claim" the component tree for exclusive Cimpress UI usage.

- `UNSAFE_className`: `string`

  Sets the CSS className for the element. Only use as a **last resort**. Use style props instead.

  See [styling guide](https://ui.cimpress.io/dev-guides/styling/).

- `UNSAFE_style`: `CSSProperties`

  Sets the CSS style for the element. Only use as a **last resort**. Use style props instead.

  See [styling guide](https://ui.cimpress.io/dev-guides/styling/).
