UI component
NavMenu
NavMenu wraps shadcn Navigation Menu into a package-friendly grouped navigation API with optional descriptions and custom item rendering.
Installation
Install the package in your app.
pnpm add @rapidset/rapidkitUsage
Import components from the package entrypoint.
import { NavMenu } from '@rapidset/rapidkit';Examples
Preview the component and copy the snippet.
API Reference
Commonly used props at a glance.
| Prop | Description |
|---|---|
| sections | Defines top-level menu triggers and the list of links shown in each section. |
| renderItem | Lets you replace the default item text block with custom content for each link. |
| linkClassName and descriptionClassName | Styles item containers and description text while keeping menu behavior unchanged. |
| value and onValueChange | Allows controlled menu state when the host app needs to manage open sections. |
| ariaLabel | Sets a descriptive label for the menu root for assistive technologies. |
Accessibility
The component is built on Radix Navigation Menu semantics and keeps disabled items non-interactive with aria-disabled markers.
Integration notes
Keep routing logic in the host app by passing href values only; this component stays presentational and router-agnostic.