ComponentsSideBar

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/rapidkit

Usage

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.

PropDescription
menuItemsProvides top-level and nested navigation items while keeping routing behavior owned by the host app.
user and userActionsConfigures the footer identity surface and action menu in a domain-neutral shape.
accessRequirements and resolveAccessInjects optional view/edit checks so access control can be enforced without app-specific imports.
brandSlot, navSlot, footerSlotLets consumers replace default sections with custom wrappers while preserving the base sidebar shell.
childrenOverrides 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.