# App sidebar, flat

- **[Sections](/blocks/)**
- **[Application](/blocks/app/)**
- **App sidebar, flat**

An app's side navigation as chrome beside every page: the product's name and up to twelve places in one list, with the signed-in person at the foot.

## Import

- **CLI**

  ```
  npx shadcn add https://ui.klarhimmel.com/r/app-sidebar-flat.json
  ```
- **Import**

  ```
  import Block from '@/components/klarhimmel/blocks/app-sidebar-flat';
  ```

Also called

- app/sidebar-flat

- **About**: An app's side navigation as chrome beside every page: the product's name and up to twelve places in one list, with the signed-in person at the foot. On a phone it folds into a menu.
- **Category**: Interface sections for signed-in products. New project? Set it up once: /get-started/installation.

## Notes

- **When to use it**: An app's side navigation as chrome beside every page: the product's name and up to twelve places in one list, with the signed-in person at the foot. Use `app-sidebar-grouped` when places need headings.
- **Writing for it**: - Write each place as the name of what the person finds there, in one or two words.
- Set the current page to the label of one item so it is marked as where the person is.
- Leave the signed-in name empty to drop the footer.
- **Watch out for**: The landmark name is not shown but is what screen reader users hear, so give it a real name. On a phone the list folds into a menu.

## Pairs well with

- **[App, sidebar navigation](/blocks/app/shell-sidebar)**
- **[App, data table](/blocks/app/data-table)**
- **[App, top bar](/blocks/app/shell-topbar)**

## Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx

```
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import AppSidebarFlat from '@/components/klarhimmel/blocks/app-sidebar-flat';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <AppSidebarFlat props={{
          "brand": "Name the product",
          "navLabel": "Main navigation",
          "items": [
            {
              "label": "First page",
              "icon": "gauge",
              "href": "#overview"
            },
            {
              "label": "Second page",
              "icon": "book",
              "href": "#bookings"
            },
            {
              "label": "Page three",
              "icon": "users",
              "href": "#team"
            },
            {
              "label": "Fourth page",
              "icon": "settings",
              "href": "#settings"
            }
          ],
          "active": "First page",
          "account": "Name the signed-in person"
        }} />
      </BlockSurface>
    </Theme>
  );
}
```

## Props

The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.

- **brand**: Text, up to 30 characters.
- **navLabel**: Text, up to 40 characters.
- **items**: List of 1 to 12. Each item: label, icon ('zap' | 'shield' | 'layers' | 'globe' | 'sparkles' | 'clock' | 'code' | 'palette' | 'lock' | 'chart' | 'users' | 'mail' | 'heart' | 'rocket' | 'search' | 'settings' | 'check' | 'star' | 'book' | 'box' | 'cloud' | 'compass' | 'leaf' | 'gauge'), href, badge (optional).
- **active**: Text, up to 30 characters.
- **account**: Text, up to 40 characters.

[Previous](/blocks/app/shell-topbar)

[Next](/blocks/app/sidebar-grouped)
