> ## Documentation Index
> Fetch the complete documentation index at: https://araf.badr.co.id/llms.txt
> Use this file to discover all available pages before exploring further.

# Sidebar Navigation

> The primary vertical navigation for application layouts — available in two styles (Default & Slim) and three color themes.

## Overview

<div style={{display:"flex",gap:"16px",padding:"28px 24px",background:"#f9fafb",borderRadius:"12px",border:"1px solid #e5e7eb",flexWrap:"wrap",alignItems:"flex-start"}}>
  <div style={{background:"#fff",borderRadius:"8px",border:"1px solid #e4e4e7",width:"180px",padding:"20px 0 16px",display:"flex",flexDirection:"column",gap:"24px",boxShadow:"0 1px 3px rgba(16,24,40,0.1)"}}>
    <div style={{padding:"0 12px",fontSize:"12px",fontWeight:700,color:"#27272a"}}>A'raf DS</div>

    <div style={{display:"flex",flexDirection:"column",gap:"2px",padding:"0 8px"}}>
      {["Home","Dashboard","Projects","Tasks","Reporting"].map((label, i) => (
                  <div key={i} style={{display:"flex",alignItems:"center",gap:"8px",padding:"6px 8px",borderRadius:"6px",background: i===1?"#f4f4f5":"transparent",fontSize:"11px",fontWeight:500,color:"#27272a"}}>
                    <div style={{width:"14px",height:"14px",background:"#e4e4e7",borderRadius:"2px"}}/>
                    {label}
                  </div>
                ))}
    </div>

    <div style={{marginTop:"auto",padding:"0 8px",borderTop:"1px solid #e4e4e7",paddingTop:"12px",fontSize:"10px",color:"#71717a"}}>Default</div>
  </div>

  <div style={{background:"#1093E7",borderRadius:"8px",width:"180px",padding:"20px 0 16px",display:"flex",flexDirection:"column",gap:"24px",boxShadow:"0 1px 3px rgba(16,24,40,0.1)"}}>
    <div style={{padding:"0 12px",fontSize:"12px",fontWeight:700,color:"#fff"}}>A'raf DS</div>

    <div style={{display:"flex",flexDirection:"column",gap:"2px",padding:"0 8px"}}>
      {["Home","Dashboard","Projects","Tasks","Reporting"].map((label, i) => (
                  <div key={i} style={{display:"flex",alignItems:"center",gap:"8px",padding:"6px 8px",borderRadius:"6px",background: i===1?"#0479CE":"transparent",fontSize:"11px",fontWeight:500,color:"#F0F9FF"}}>
                    <div style={{width:"14px",height:"14px",background:"rgba(255,255,255,0.2)",borderRadius:"2px"}}/>
                    {label}
                  </div>
                ))}
    </div>

    <div style={{marginTop:"auto",padding:"0 8px",borderTop:"1px solid rgba(255,255,255,0.2)",paddingTop:"12px",fontSize:"10px",color:"#BBE1FC"}}>Primary Dark</div>
  </div>

  <div style={{background:"#3f3f46",borderRadius:"8px",width:"180px",padding:"20px 0 16px",display:"flex",flexDirection:"column",gap:"24px",boxShadow:"0 1px 3px rgba(16,24,40,0.1)"}}>
    <div style={{padding:"0 12px",fontSize:"12px",fontWeight:700,color:"#fff"}}>A'raf DS</div>

    <div style={{display:"flex",flexDirection:"column",gap:"2px",padding:"0 8px"}}>
      {["Home","Dashboard","Projects","Tasks","Reporting"].map((label, i) => (
                  <div key={i} style={{display:"flex",alignItems:"center",gap:"8px",padding:"6px 8px",borderRadius:"6px",background: i===1?"#52525b":"transparent",fontSize:"11px",fontWeight:500,color:"#E4E4E7"}}>
                    <div style={{width:"14px",height:"14px",background:"rgba(255,255,255,0.15)",borderRadius:"2px"}}/>
                    {label}
                  </div>
                ))}
    </div>

    <div style={{marginTop:"auto",padding:"0 8px",borderTop:"1px solid rgba(255,255,255,0.15)",paddingTop:"12px",fontSize:"10px",color:"#A1A1AA"}}>Gray Dark</div>
  </div>

  <div style={{background:"#fff",borderRadius:"8px",border:"1px solid #e4e4e7",width:"52px",padding:"20px 0 16px",display:"flex",flexDirection:"column",alignItems:"center",gap:"16px",boxShadow:"0 1px 3px rgba(16,24,40,0.1)"}}>
    <div style={{width:"24px",height:"24px",background:"linear-gradient(180deg,#fff 0%,#CDE4F5 100%)",border:"1px solid #D0D5DD",borderRadius:"6px"}} />

    <div style={{display:"flex",flexDirection:"column",gap:"6px",alignItems:"center"}}>
      {[0,1,2,3,4].map(i => (
                  <div key={i} style={{width:"36px",height:"36px",background: i===1?"#f4f4f5":"transparent",borderRadius:"8px",display:"flex",alignItems:"center",justifyContent:"center"}}>
                    <div style={{width:"16px",height:"16px",background:"#a1a1aa",borderRadius:"2px"}}/>
                  </div>
                ))}
    </div>

    <div style={{marginTop:"auto",fontSize:"9px",color:"#71717a"}}>Slim</div>
  </div>
</div>

The **Sidebar Navigation** component is the primary vertical navigation for application layouts. It is available in **2 styles** (Default and Slim) with **3 color themes**, plus an optional footer section containing the user account and utility links.

***

## Installation

<CodeGroup>
  ```bash npm theme={null}
  npm install @araf-ds/core
  ```

  ```bash yarn theme={null}
  yarn add @araf-ds/core
  ```

  ```bash pnpm theme={null}
  pnpm add @araf-ds/core
  ```
</CodeGroup>

***

## Usage

```tsx theme={null}
import { SidebarNavigation } from "@araf-ds/core"

export default function Layout({ children }) {
  return (
    <div style={{ display: "flex" }}>
      <SidebarNavigation />
      <main>{children}</main>
    </div>
  )
}
```

***

## Style

Two styles are available based on the sidebar layout format.

### Default

Full-width sidebar with icons and text labels. Width: **312px**.

<div style={{padding:"24px",background:"#f9fafb",borderRadius:"12px",border:"1px solid #e5e7eb"}}>
  <div style={{background:"#fff",borderRadius:"8px",border:"1px solid #e4e4e7",width:"220px",padding:"24px 0 20px",display:"flex",flexDirection:"column",gap:"32px",boxShadow:"0 1px 3px rgba(16,24,40,0.1)"}}>
    <div style={{padding:"0 16px",fontSize:"13px",fontWeight:700,color:"#27272a"}}>A'raf DS</div>

    <div style={{display:"flex",flexDirection:"column",gap:"2px",padding:"0 8px"}}>
      {[["Home",""],["Dashboard","active"],["Projects",""],["Tasks",""],["Reporting",""],["Users",""]].map(([label,state]) => (
                  <div key={label} style={{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",borderRadius:"6px",background: state==="active"?"#f4f4f5":"transparent"}}>
                    <div style={{display:"flex",alignItems:"center",gap:"12px"}}>
                      <div style={{width:"16px",height:"16px",background:"#a1a1aa",borderRadius:"2px"}}/>
                      <span style={{fontSize:"12px",fontWeight:500,color:"#27272a"}}>{label}</span>
                    </div>
                    <div style={{width:"12px",height:"12px",borderRight:"1.5px solid #a1a1aa",borderBottom:"1.5px solid #a1a1aa",transform:"rotate(45deg)",marginRight:"2px",marginTop:"-4px"}}/>
                  </div>
                ))}
    </div>
  </div>
</div>

```tsx theme={null}
<SidebarNavigation style="default" theme="default" />
```

### Slim

Compact icon-only sidebar without text labels. Width: **80px**. Ideal for smaller screens or as the collapsed state of the Default sidebar.

<div style={{padding:"24px",background:"#f9fafb",borderRadius:"12px",border:"1px solid #e5e7eb"}}>
  <div style={{background:"#fff",borderRadius:"8px",border:"1px solid #e4e4e7",width:"68px",padding:"24px 0 20px",display:"flex",flexDirection:"column",alignItems:"center",gap:"20px",boxShadow:"0 1px 3px rgba(16,24,40,0.1)"}}>
    <div style={{width:"28px",height:"28px",background:"linear-gradient(180deg,#fff 0%,#CDE4F5 100%)",border:"1px solid #D0D5DD",borderRadius:"6px"}} />

    <div style={{display:"flex",flexDirection:"column",gap:"6px",alignItems:"center"}}>
      {[false,true,false,false,false,false].map((active,i) => (
                  <div key={i} style={{width:"44px",height:"44px",background: active?"#f4f4f5":"transparent",borderRadius:"10px",display:"flex",alignItems:"center",justifyContent:"center"}}>
                    <div style={{width:"18px",height:"18px",background: active?"#52525b":"#a1a1aa",borderRadius:"3px"}}/>
                  </div>
                ))}
    </div>
  </div>
</div>

```tsx theme={null}
<SidebarNavigation style="slim" theme="default" />
```

***

## Themes

Three color themes to match your project's branding.

<Tabs>
  <Tab title="Default">
    White-dominant with dark text. Best for light-themed applications.

    <div style={{display:"inline-flex",background:"#fff",borderRadius:"8px",border:"1px solid #e4e4e7",width:"220px",padding:"24px 0 20px",flexDirection:"column",gap:"32px",boxShadow:"0 1px 3px rgba(16,24,40,0.1)",marginTop:"12px"}}>
      <div style={{padding:"0 16px",fontSize:"13px",fontWeight:700,color:"#27272a"}}>A'raf DS</div>

      <div style={{display:"flex",flexDirection:"column",gap:"2px",padding:"0 8px"}}>
        {[["Home",""],["Dashboard","active"],["Projects",""],["Settings",""]].map(([label,state]) => (
                        <div key={label} style={{display:"flex",alignItems:"center",gap:"12px",padding:"8px 12px",borderRadius:"6px",background: state==="active"?"#f4f4f5":"transparent"}}>
                          <div style={{width:"16px",height:"16px",background:"#a1a1aa",borderRadius:"2px"}}/>
                          <span style={{fontSize:"12px",fontWeight:500,color:"#27272a"}}>{label}</span>
                        </div>
                      ))}
      </div>
    </div>

    | Token          | Value     |
    | -------------- | --------- |
    | Background     | `#FFFFFF` |
    | Text           | `#27272A` |
    | Active item bg | `#F4F4F5` |
    | Border         | `#E4E4E7` |

    ```tsx theme={null}
    <SidebarNavigation theme="default" />
    ```
  </Tab>

  <Tab title="Primary Dark">
    Brand-dominant (`#1093E7`) with white text. Best for applications with a strong blue accent.

    <div style={{display:"inline-flex",background:"#1093E7",borderRadius:"8px",width:"220px",padding:"24px 0 20px",flexDirection:"column",gap:"32px",boxShadow:"0 1px 3px rgba(16,24,40,0.1)",marginTop:"12px"}}>
      <div style={{padding:"0 16px",fontSize:"13px",fontWeight:700,color:"#fff"}}>A'raf DS</div>

      <div style={{display:"flex",flexDirection:"column",gap:"2px",padding:"0 8px"}}>
        {[["Home",""],["Dashboard","active"],["Projects",""],["Settings",""]].map(([label,state]) => (
                        <div key={label} style={{display:"flex",alignItems:"center",gap:"12px",padding:"8px 12px",borderRadius:"6px",background: state==="active"?"#0479CE":"transparent"}}>
                          <div style={{width:"16px",height:"16px",background:"rgba(255,255,255,0.25)",borderRadius:"2px"}}/>
                          <span style={{fontSize:"12px",fontWeight:500,color:"#F0F9FF"}}>{label}</span>
                        </div>
                      ))}
      </div>
    </div>

    | Token          | Value                |
    | -------------- | -------------------- |
    | Background     | `#1093E7` (Blue/600) |
    | Text           | `#F0F9FF` (Blue/100) |
    | Active item bg | `#0479CE` (Blue/700) |

    ```tsx theme={null}
    <SidebarNavigation theme="primary-dark" />
    ```
  </Tab>

  <Tab title="Gray Dark">
    Gray-dominant (`#3F3F46`) with light text. Best for dark or neutral themed applications.

    <div style={{display:"inline-flex",background:"#3F3F46",borderRadius:"8px",width:"220px",padding:"24px 0 20px",flexDirection:"column",gap:"32px",boxShadow:"0 1px 3px rgba(16,24,40,0.1)",marginTop:"12px"}}>
      <div style={{padding:"0 16px",fontSize:"13px",fontWeight:700,color:"#fff"}}>A'raf DS</div>

      <div style={{display:"flex",flexDirection:"column",gap:"2px",padding:"0 8px"}}>
        {[["Home",""],["Dashboard","active"],["Projects",""],["Settings",""]].map(([label,state]) => (
                        <div key={label} style={{display:"flex",alignItems:"center",gap:"12px",padding:"8px 12px",borderRadius:"6px",background: state==="active"?"#52525B":"transparent"}}>
                          <div style={{width:"16px",height:"16px",background:"rgba(255,255,255,0.2)",borderRadius:"2px"}}/>
                          <span style={{fontSize:"12px",fontWeight:500,color:"#E4E4E7"}}>{label}</span>
                        </div>
                      ))}
      </div>
    </div>

    | Token          | Value               |
    | -------------- | ------------------- |
    | Background     | `#3F3F46` (Gray/07) |
    | Text           | `#E4E4E7` (Gray/02) |
    | Active item bg | `#52525B` (Gray/06) |

    ```tsx theme={null}
    <SidebarNavigation theme="gray-dark" />
    ```
  </Tab>
</Tabs>

***

## Nav Item

Each navigation item supports several optional elements.

<div style={{display:"flex",flexDirection:"column",gap:"4px",padding:"24px",background:"#f9fafb",borderRadius:"12px",border:"1px solid #e5e7eb"}}>
  <div style={{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",borderRadius:"6px",background:"#fff",border:"1px solid #e4e4e7",width:"280px"}}>
    <div style={{display:"flex",alignItems:"center",gap:"8px"}}>
      <div style={{width:"8px",height:"8px",background:"#22C55E",borderRadius:"50%"}} />

      <div style={{width:"16px",height:"16px",background:"#a1a1aa",borderRadius:"2px"}} />

      <span style={{fontSize:"13px",fontWeight:500,color:"#27272a"}}>Dashboard</span>
    </div>

    <div style={{display:"flex",alignItems:"center",gap:"6px"}}>
      <span style={{background:"#D4D4D8",borderRadius:"16px",padding:"1px 8px",fontSize:"11px",fontWeight:500,color:"#27272a"}}>10</span>
      <span style={{fontSize:"10px",color:"#a1a1aa"}}>⌄</span>
    </div>
  </div>

  <div style={{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",borderRadius:"6px",background:"#0479CE",width:"280px"}}>
    <div style={{display:"flex",alignItems:"center",gap:"8px"}}>
      <div style={{width:"8px",height:"8px",background:"#fff",borderRadius:"50%"}} />

      <div style={{width:"16px",height:"16px",background:"rgba(255,255,255,0.3)",borderRadius:"2px"}} />

      <span style={{fontSize:"13px",fontWeight:500,color:"#fff"}}>Projects</span>
    </div>

    <div style={{display:"flex",alignItems:"center",gap:"6px"}}>
      <span style={{background:"#EEF6FC",borderRadius:"16px",padding:"1px 8px",fontSize:"11px",fontWeight:500,color:"#084F84"}}>5</span>
      <span style={{fontSize:"10px",color:"rgba(255,255,255,0.7)"}}>⌄</span>
    </div>
  </div>
</div>

| Element          | Prop       | Default | Description                          |
| ---------------- | ---------- | ------- | ------------------------------------ |
| Status dot       | `dot`      | `true`  | Notification/active status indicator |
| Icon             | `icon`     | `true`  | Left-side icon                       |
| Number badge     | `badge`    | `false` | Notification or item count           |
| Dropdown chevron | `dropdown` | `false` | Sub-menu indicator                   |
| Active state     | `current`  | `false` | Highlights the current page          |

### States

<div style={{display:"flex",gap:"8px",flexDirection:"column",padding:"24px",background:"#f9fafb",borderRadius:"12px",border:"1px solid #e5e7eb"}}>
  {[
      ["Default","#fff","#27272a","1px solid #e4e4e7"],
      ["Hover","#f4f4f5","#27272a","transparent"],
      ["Current (active)","#0479CE","#fff","transparent"],
    ].map(([label,bg,color,border]) => (
      <div key={label} style={{display:"flex",alignItems:"center",gap:"12px"}}>
        <div style={{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px",borderRadius:"6px",background:bg,border:border,width:"160px"}}>
          <div style={{width:"14px",height:"14px",background: label.includes("Current")?"rgba(255,255,255,0.3)":"#a1a1aa",borderRadius:"2px"}}/>
          <span style={{fontSize:"12px",fontWeight:500,color:color}}>Menu item</span>
        </div>
        <span style={{fontSize:"12px",color:"#71717a"}}>{label}</span>
      </div>
    ))}
</div>

```tsx theme={null}
// Default (inactive)
<NavItem label="Dashboard" icon={BarChartIcon} />

// Active / current page
<NavItem label="Dashboard" icon={BarChartIcon} current />

// With badge count
<NavItem label="Inbox" icon={InboxIcon} badge={12} />

// With dropdown (sub-menu)
<NavItem label="Projects" icon={LayersIcon} dropdown />
```

***

## Footer

The `footer` prop renders a utility area at the bottom of the sidebar with Support, Settings, and user account information.

<div style={{padding:"24px",background:"#f9fafb",borderRadius:"12px",border:"1px solid #e5e7eb"}}>
  <div style={{background:"#fff",borderRadius:"8px",border:"1px solid #e4e4e7",width:"220px",display:"flex",flexDirection:"column",gap:"4px",padding:"12px 8px",boxShadow:"0 1px 3px rgba(16,24,40,0.05)"}}>
    {["Support","Settings"].map(label => (
            <div key={label} style={{display:"flex",alignItems:"center",gap:"12px",padding:"8px 12px",borderRadius:"6px"}}>
              <div style={{width:"16px",height:"16px",background:"#a1a1aa",borderRadius:"50%"}}/>
              <span style={{fontSize:"12px",fontWeight:500,color:"#27272a"}}>{label}</span>
            </div>
          ))}

    <div style={{borderTop:"1px solid #e4e4e7",margin:"8px 0"}} />

    <div style={{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"4px 8px"}}>
      <div style={{display:"flex",alignItems:"center",gap:"8px"}}>
        <div style={{width:"32px",height:"32px",background:"#CDE4F5",borderRadius:"50%"}} />

        <div>
          <div style={{fontSize:"11px",fontWeight:700,color:"#27272a"}}>Iqbal Maulana</div>
          <div style={{fontSize:"10px",color:"#71717a"}}>[iqbalm@email.com](mailto:iqbalm@email.com)</div>
        </div>
      </div>

      <div style={{width:"16px",height:"16px",background:"#e4e4e7",borderRadius:"3px"}} />
    </div>
  </div>
</div>

The footer contains:

* **Support** — Link to the support page
* **Settings** — Link to application settings
* **Account** — Avatar, name, and email of the logged-in user
* **Logout button** — End the current session

```tsx theme={null}
// With footer (default: true)
<SidebarNavigation footer />

// Without footer
<SidebarNavigation footer={false} />
```

***

## API Reference

### SidebarNavigation

<ParamField path="style" type="string" default="default">
  Sidebar layout style. Values: `default` · `slim`
</ParamField>

<ParamField path="theme" type="string" default="default">
  Color theme. Values: `default` · `primary-dark` · `gray-dark`
</ParamField>

<ParamField path="footer" type="boolean" default="true">
  Renders the footer area with Support, Settings, and user account information.
</ParamField>

<ParamField path="className" type="string">
  Additional Tailwind classes for custom sizing or positioning.
</ParamField>

### NavItem

<ParamField path="label" type="string">
  Menu item text label. Not displayed in `slim` style.
</ParamField>

<ParamField path="icon" type="ComponentType">
  Icon component displayed to the left of the label.
</ParamField>

<ParamField path="current" type="boolean" default="false">
  Marks this item as the currently active page.
</ParamField>

<ParamField path="badge" type="number">
  Number displayed as a badge on the right side of the label.
</ParamField>

<ParamField path="dropdown" type="boolean" default="false">
  Shows a chevron indicating a collapsible sub-menu.
</ParamField>

<ParamField path="dot" type="boolean" default="false">
  Shows a green dot as a notification or status indicator.
</ParamField>

***

## Accessibility

* Sidebar uses a semantic `<nav>` element
* Active item carries the `aria-current="page"` attribute
* Slim style **must** provide `aria-label` on every nav item for screen reader support
* Full keyboard navigation: Tab, Enter, Space
* Focus rings are visible on all interactive items

***

## Do's & Don'ts

<CardGroup cols={2}>
  <Card title="Do" icon="check" iconType="solid" color="#16A34A">
    * Use one consistent theme throughout the entire application
    * Always mark exactly one item as `current` matching the active page
    * Use Slim for tablet breakpoints or as a collapsed state
    * Provide tooltip labels on Slim sidebar items for accessibility
  </Card>

  <Card title="Don't" icon="xmark" iconType="solid" color="#DC2626">
    * Don't show more than 2 levels of navigation inside the sidebar
    * Don't set more than one item as `current` simultaneously
    * Don't hide the sidebar without providing an alternative navigation path
    * Don't mix sidebar theme colors with custom colors outside the design system
  </Card>
</CardGroup>
