UI component
SideBar
SideBar composes shadcn sidebar primitives into a package-safe navigation shell with injectable access checks and customizable child sections.
Installation
Install the package in your app.
pnpm add @rapidset/rapidkitUsage
Import components from the package entrypoint.
import { SideBar } from '@rapidset/rapidkit';Examples
Preview the component and copy the snippet.
API Reference
Commonly used props at a glance.
| Prop | Description |
|---|---|
| menuItems | Provides top-level and nested navigation items while keeping routing behavior owned by the host app. |
| user and userActions | Configures the footer identity surface and action menu in a domain-neutral shape. |
| accessRequirements and resolveAccess | Injects optional view/edit checks so access control can be enforced without app-specific imports. |
| brandSlot, navSlot, footerSlot | Lets consumers replace default sections with custom wrappers while preserving the base sidebar shell. |
| children | Overrides the default composed sections entirely when full custom sidebar content is needed. |
Accessibility
The component builds on accessible sidebar/menu primitives and keeps keyboard-friendly interactive controls for menu and user actions.
Integration notes
Keep permission resolution and route handling in your app layer. Pass plain navigation metadata and callbacks into SideBar props.
Optional access rules
When view access is denied the sidebar returns null. When view is allowed but edit is denied, interactive menu and user actions are rendered as read-only.