# App layouts
> App layouts describe the fundamental structure of an application. It defines the basic areas and explains roughly where which kind of content belongs.

There are two fundamental layouts:

In most cases the header-based layout is recommended. The sidebar-based layout is only recommended for map based applications.

## Header-based Layout (regular)

<DataList.Root orientation="vertical" emphasize="label">
  <DataList.Row>
    <DataList.Label>When to use</DataList.Label>
    <DataList.Value marginTop="spacingS">
      Use for any regular application.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Description</DataList.Label>
    <DataList.Value marginTop="spacingS">
      The header serves as the main title of the application and as such carries
      basic information, such as branding, app title and connection status, it
      can also offer global features, such as user profile, settings and user
      manual.
      <br />
      The main container offers space for content, such as dashboards and
      landing pages.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Behaviour</DataList.Label>
    <DataList.Value marginTop="spacingS">
      The header is at the top of the screen while the main container is below.
      When scrolling the header remains fixed and the main container scrolls
      underneath it.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Components to use</DataList.Label>
    <DataList.Value marginTop="spacingS">
      <ul margin="none">
        <li>
          <Link href="/components/app-frame">App Frame</Link>
        </li>
        <li>
          <Link href="/components/app-header">App Header</Link>
        </li>
      </ul>
    </DataList.Value>
  </DataList.Row>
</DataList.Root>

### With app bar

<DataList.Root orientation="vertical" emphasize="label">
  <DataList.Row>
    <DataList.Label>When to use</DataList.Label>
    <DataList.Value marginTop="spacingS">
      If you have a product that consists of multiple modules or a bunch of
      applications, this app bar serves as a navigation across them.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Description</DataList.Label>
    <DataList.Value marginTop="spacingS">
      The app bar offers a navigation to multiple modules or applications that
      open to the right of it.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Behaviour</DataList.Label>
    <DataList.Value marginTop="spacingS">
      The app bar can be considered to be on hierarchy level 1, the header is
      level 2 and the main container level 3. When scrolling the app bar and the
      header remains fixed and the main container scrolls underneath it.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Components to use</DataList.Label>
    <DataList.Value marginTop="spacingS">
      <ul margin="none">
        <li>
          <Link href="/components/app-bar">App Bar</Link>
        </li>
        <li>
          <Link href="/components/app-frame">App Frame</Link>
        </li>
        <li>
          <Link href="/components/app-header">App Header</Link>
        </li>
      </ul>
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Demos</DataList.Label>
    <DataList.Value marginTop="spacingS">
      <ul margin="none">
        <li>
          <Link href="https://next--698f15fa99e7b146f9002f64.chromatic.com/?path=/story/demos-applayouts-headerbased--nav-bar-and-app-bar">
            App layout
          </Link>
        </li>
        <li>
          <Link href="https://next--698f15fa99e7b146f9002f64.chromatic.com/?path=/story/components-appbar--default">
            Storybook example
          </Link>
        </li>
      </ul>
    </DataList.Value>
  </DataList.Row>
</DataList.Root>

### With sidebar

<DataList.Root orientation="vertical" emphasize="label">
  <DataList.Row>
    <DataList.Label>When to use</DataList.Label>
    <DataList.Value marginTop="spacingS">
      If you need to offer multiple pages of content: consider to use this kind
      of sidebar.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Description</DataList.Label>
    <DataList.Value marginTop="spacingS">
      The sidebar offers a navigation to multiple pages of content that open to
      the right of it.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Behaviour</DataList.Label>
    <DataList.Value marginTop="spacingS">
      The header can be considered to be on hierarchy level 1, the sidebar is
      level 2 and the main container level 3. When scrolling the header and the
      sidebar remains fixed and the main container scrolls underneath it.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Components to use</DataList.Label>
    <DataList.Value marginTop="spacingS">
      <ul margin="none">
        <li>
          <Link href="/components/app-frame">App Frame</Link>
        </li>
        <li>
          <Link href="/components/app-header">App Header</Link>
        </li>
        <li>
          <Link href="/components/sidebar-navigation">Sidebar Navigation</Link>
        </li>
      </ul>
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Demos</DataList.Label>
    <DataList.Value marginTop="spacingS">
      <ul margin="none">
        <li>
          <Link href="https://next--698f15fa99e7b146f9002f64.chromatic.com/?path=/story/demos-applayouts-headerbased--sidebar">
            App layout
          </Link>
        </li>
        <li>
          <Link href="https://next--698f15fa99e7b146f9002f64.chromatic.com/?path=/story/components-sidebarnavigation--without-visuals">
            Storybook example
          </Link>
        </li>
      </ul>
    </DataList.Value>
  </DataList.Row>
</DataList.Root>

### With nav bar

<DataList.Root orientation="vertical" emphasize="label">
  <DataList.Row>
    <DataList.Label>When to use</DataList.Label>
    <DataList.Value marginTop="spacingS">
      If you need to offer some multiple pages of content: consider to use the
      nav bar. This is recommended when you have only a few (e.g. less than 7)
      pages.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Description</DataList.Label>
    <DataList.Value marginTop="spacingS">
      The nav bar tabs offers a navigation to multiple pages of content that
      open below it.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Behaviour</DataList.Label>
    <DataList.Value marginTop="spacingS">
      The header can be considered to be on hierarchy level 1, the nav bar is
      level 2 and the main container level 3. When scrolling the header and the
      tabs remains fixed and the main container scrolls underneath it.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Components to use</DataList.Label>
    <DataList.Value marginTop="spacingS">
      <ul margin="none">
        <li>
          <Link href="/components/app-frame">App Frame</Link>
        </li>
        <li>
          <Link href="/components/app-header">App Header</Link>
        </li>
        <li>
          <Link href="/components/nav-bar">Nav Bar</Link>
        </li>
      </ul>
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Demos</DataList.Label>
    <DataList.Value marginTop="spacingS">
      <ul margin="none">
        <li>
          <Link href="https://next--698f15fa99e7b146f9002f64.chromatic.com/?path=/story/demos-applayouts-headerbased--nav-bar">
            App layout
          </Link>
        </li>
        <li>
          <Link href="https://next--698f15fa99e7b146f9002f64.chromatic.com/?path=/story/components-navbar--with-app-frame">
            Storybook example
          </Link>
        </li>
      </ul>
    </DataList.Value>
  </DataList.Row>
</DataList.Root>

### With nav bar and sidebar

<DataList.Root orientation="vertical" emphasize="label">
  <DataList.Row>
    <DataList.Label>When to use</DataList.Label>
    <DataList.Value marginTop="spacingS">
      If you have tabs and need to offer some multiple sub pages: consider to
      use this kind of sidebar.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Description</DataList.Label>
    <DataList.Value marginTop="spacingS">
      The tabs offers a navigation to multiple pages of content that open below
      it. Within these pages an additional sidebar can be used to give access to
      multiple sub pages.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Behaviour</DataList.Label>
    <DataList.Value marginTop="spacingS">
      The header can be considered to be on hierarchy level 1, the nav bar is
      level 2, the sidebar level 3 and the main container level 4. When
      scrolling the header and the tabs remains fixed and the main container
      scrolls underneath it.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Components to use</DataList.Label>
    <DataList.Value marginTop="spacingS">
      <ul margin="none">
        <li>
          <Link href="/components/app-frame">App Frame</Link>
        </li>
        <li>
          <Link href="/components/app-header">App Header</Link>
        </li>
        <li>
          <Link href="/components/nav-bar">Nav Bar</Link>
        </li>
        <li>
          <Link href="/components/sidebar-navigation">Sidebar Navigation</Link>
        </li>
      </ul>
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Demos</DataList.Label>
    <DataList.Value marginTop="spacingS">
      <ul margin="none">
        <li>
          <Link href="https://next--698f15fa99e7b146f9002f64.chromatic.com/?path=/story/demos-applayouts-headerbased--content-sidebar">
            App layout
          </Link>
        </li>
      </ul>
    </DataList.Value>
  </DataList.Row>
</DataList.Root>

---

## Sidebar-based layout

<DataList.Root orientation="vertical" emphasize="label">
  <DataList.Row>
    <DataList.Label>When to use</DataList.Label>
    <DataList.Value marginTop="spacingS">
      Use for any map based application.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Description</DataList.Label>
    <DataList.Value marginTop="spacingS">
      As an alternative to the header-based layout you may chose the
      sidebar-based layout. This is recommended for any map-based applications.
      The sidebar contains a little header which serves as the main title of the
      application. Global features, such as user profile, settings and user
      manual have to be added to the sidebar.
      <br />
      The main container offers space for content, such as maps, dashboards or
      landing pages.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Behaviour</DataList.Label>
    <DataList.Value marginTop="spacingS">
      The sidebar is at the left of the screen while the main container is on
      the right. When scrolling the sidebar remains fixed and the main container
      scrolls underneath it.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Components to use</DataList.Label>
    <DataList.Value marginTop="spacingS">
      <ul margin="none">
        <li>
          <Link href="/components/app-frame-with-sidebar">
            App Frame With Sidebar
          </Link>
        </li>
        <li>
          <Link href="/components/sidebar-navigation">Sidebar Navigation</Link>
        </li>
      </ul>
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Demos</DataList.Label>
    <DataList.Value marginTop="spacingS">
      <ul margin="none">
        <li>
          <Link href="https://next--698f15fa99e7b146f9002f64.chromatic.com/?path=/story/demos-applayouts-sidebarbased--default">
            App layout
          </Link>
        </li>
        <li>
          <Link href="https://next--698f15fa99e7b146f9002f64.chromatic.com/?path=/story/components-sidebarnavigation--with-map">
            Storybook example
          </Link>
        </li>
      </ul>
    </DataList.Value>
  </DataList.Row>
</DataList.Root>

### With a header

<DataList.Root orientation="vertical" emphasize="label">
  <DataList.Row>
    <DataList.Label>When to use</DataList.Label>
    <DataList.Value marginTop="spacingS">
      Use for any map based application that have an additional need for a
      header.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Description</DataList.Label>
    <DataList.Value marginTop="spacingS">
      As an addition to the sidebar-based layout you may chose to add a header.
      This is recommended for any map-based applications that require a header.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Behaviour</DataList.Label>
    <DataList.Value marginTop="spacingS">
      The sidebar is at the left of the screen, the header is on its right and
      at the top. The main container is on the right and bottom. When scrolling
      the sidebar and the header remain fixed and the main container scrolls
      underneath it.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Components to use</DataList.Label>
    <DataList.Value marginTop="spacingS">
      <ul margin="none">
        <li>
          <Link href="/components/app-frame-with-sidebar">
            App Frame With Sidebar
          </Link>
        </li>
        <li>
          <Link href="/components/sidebar-navigation">Sidebar Navigation</Link>
        </li>
        <li>
          <Link href="/components/app-header">App Header</Link>
        </li>
      </ul>
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Demos</DataList.Label>
    <DataList.Value marginTop="spacingS">
      <ul margin="none">
        <li>
          <Link href="https://next--698f15fa99e7b146f9002f64.chromatic.com/?path=/story/demos-applayouts-sidebarbased--sidebar-and-header">
            App layout
          </Link>
        </li>
        <li>
          <Link href="https://next--698f15fa99e7b146f9002f64.chromatic.com/?path=/story/components-sidebarnavigation--default">
            Storybook example
          </Link>
        </li>
      </ul>
    </DataList.Value>
  </DataList.Row>
</DataList.Root>

---

## Dialog

<DataList.Root orientation="vertical" emphasize="label">
  <DataList.Row>
    <DataList.Label>When to use</DataList.Label>
    <DataList.Value marginTop="spacingS">
      Use to show any temporary content, like messages, forms, inputs.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Description</DataList.Label>
    <DataList.Value marginTop="spacingS">
      In addition to the basic layout the dialog can be used to show any
      temporary content on top of the regular content.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Behaviour</DataList.Label>
    <DataList.Value marginTop="spacingS">
      Dialogs open above regular content. While a dialog is opened the
      underlying content should not be changed.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Components to use</DataList.Label>
    <DataList.Value marginTop="spacingS">
      <ul margin="none">
        <li>
          <Link href="/components/dialog">Dialog</Link>
        </li>
      </ul>
    </DataList.Value>
  </DataList.Row>
</DataList.Root>

## Drawer

<DataList.Root orientation="vertical" emphasize="label">
  <DataList.Row>
    <DataList.Label>When to use</DataList.Label>
    <DataList.Value marginTop="spacingS">
      Use a drawer to temporarily show some kind of additional content. The
      content should not be too much and not too complex. Consider a proper
      pager otherwise.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Description</DataList.Label>
    <DataList.Value marginTop="spacingS">
      In addition to the basic layout the drawer can be used to show any
      temporary content on the rights (or left) side of the screen.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Behaviour</DataList.Label>
    <DataList.Value marginTop="spacingS">
      Drawers open above regular content and header. While a drawer is opened
      the underlying content should not be changed.
    </DataList.Value>
  </DataList.Row>
  <DataList.Row>
    <DataList.Label>Components to use</DataList.Label>
    <DataList.Value marginTop="spacingS">
      <ul margin="none">
        <li>
          <Link href="/components/drawer">Drawer</Link>
        </li>
      </ul>
    </DataList.Value>
  </DataList.Row>
</DataList.Root>
