AI Components / Sidebar (deprecated)
Sidebar (deprecated)
Deprecated alias of `ai-app-sidebar` — wraps the renamed element and re-fires events under the legacy names. Use `ai-app-sidebar` directly; this shim will be removed in v0.6.0.
ai-essentialsv0.5.0
Playground
Examples
Legacy sidebar
<ai-sidebar style="max-width:250px;height:300px;"></ai-sidebar>Import
import { AiSidebar } from '@cognivo/components';// Or tree-shake: import '@cognivo/components/ai-sidebar';Per-component imports ship only that component (~8 kB gzip).
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
sections | {title, items}[] | — | Sidebar sections |
collapsed | boolean | false | Collapsed mode |
activeId | string | — | Active item ID |
Events
| Event | Detail | Description |
|---|---|---|
ai-sidebar-item-click | {id, label} | Item clicked (legacy event, preserved) |
ai-sidebar-collapse | {collapsed} | Collapse toggled (legacy event, preserved) |