# Sidebar

Provides app-level navigation in a collapsible side panel. Use it to group destinations, actions, and account entries that persist across pages.

Package: `@kela-systems/ui-components` 4.1.0

```tsx
import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar } from "@kela-systems/ui-components";
```

Links (Kela sign-in needed): [Storybook](https://main--6af1efd9453270bb59a6c00c.chromatic.com/?path=/docs/components-sidebar--docs), [Source](https://github.com/Kela-Systems/kela/tree/main/packages/next/ui-components/src/sidebar), [Figma](https://www.figma.com/design/anhlwrbFM6mUiL0klxeK1I/ARK---Design-System?node-id=5143-200)

## Props

A `className` on a part adds layout only: placement, sizing and spacing. Pick a look with a variant.

### Sidebar

| Variant | Values | Default |
| --- | --- | --- |
| `side` | `start`, `end` | `start` |
| `variant` | `sidebar`, `floating`, `inset` | `sidebar` |
| `collapsible` | `offcanvas`, `icon`, `none` | `offcanvas` |

Also takes the attributes of the HTML element it renders.

### SidebarContent

Also takes the attributes of the HTML element it renders.

### SidebarFooter

Also takes the attributes of the HTML element it renders.

### SidebarGroup

Also takes the attributes of the HTML element it renders.

### SidebarGroupAction

Also takes the attributes of the HTML element it renders.

### SidebarGroupContent

Also takes the attributes of the HTML element it renders.

### SidebarGroupLabel

| Variant | Values | Default |
| --- | --- | --- |
| `size` | `xs`, `sm` | `xs` |

Also takes the attributes of the HTML element it renders.

### SidebarHeader

Also takes the attributes of the HTML element it renders.

### SidebarInput

Also takes the attributes of the HTML element it renders.

### SidebarInset

Also takes the attributes of the HTML element it renders.

### SidebarMenu

Also takes the attributes of the HTML element it renders.

### SidebarMenuAction

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `showOnHover` | `boolean` | `false` |  |

Also takes the attributes of the HTML element it renders.

### SidebarMenuBadge

Also takes the attributes of the HTML element it renders.

### SidebarMenuButton

| Variant | Values | Default |
| --- | --- | --- |
| `variant` | `default`, `outline` | `default` |
| `size` | `default`, `sm`, `lg` | `default` |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `isActive` | `boolean` | `false` |  |
| `tooltip` | `string \| React.ComponentProps<typeof TooltipContent>` |  |  |

Also takes the attributes of the HTML element it renders.

### SidebarMenuItem

Also takes the attributes of the HTML element it renders.

### SidebarMenuSkeleton

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `showIcon` | `boolean` | `false` |  |

Also takes the attributes of the HTML element it renders.

### SidebarMenuSub

Also takes the attributes of the HTML element it renders.

### SidebarMenuSubButton

| Variant | Values | Default |
| --- | --- | --- |
| `size` | `sm`, `default` | `default` |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `isActive` | `boolean` | `false` |  |

Also takes the attributes of the HTML element it renders.

### SidebarMenuSubItem

Also takes the attributes of the HTML element it renders.

### SidebarProvider

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `defaultOpen` | `boolean` | `true` |  |
| `open` | `boolean` |  |  |
| `onOpenChange` | `(open: boolean) => void` |  |  |

Also takes the attributes of the HTML element it renders.

### SidebarRail

Also takes the attributes of the HTML element it renders.

### SidebarSeparator

Also takes the props of `@base-ui/react/separator`.

### SidebarTrigger

| Variant | Values | Default |
| --- | --- | --- |
| `variant` | `default`, `secondary`, `destructive`, `outline`, `ghost`, `link` | `default` |
| `size` | `default`, `xs`, `sm`, `lg`, `icon`, `icon-xs`, `icon-sm`, `icon-lg` | `default` |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `loading` | `boolean` |  | Shows a spinner and prevents interaction while keeping the variant's resting colors. |

Also takes the props of `@base-ui/react/button`.

### Also exported

- `useSidebar` (hook)
