Dashboard Mobile Navigation
Use an accessible, responsive disclosure for compact dashboard navigation with Puzzle Pieces.
DashboardMobileNavigation presents dashboard links in a native disclosure. It
is a compact alternative to an overlay drawer when navigation can expand
inline. It does not own application routing, authorization, or route visibility.
Import
import { DashboardMobileNavigation } from "@puzzle-ui/pieces";Example
Pass the same navigation items and current path used by the desktop dashboard
navigation. The built-in styles display this component up to 48rem; it is
hidden at wider viewports.
The trigger's label text is its accessible name; it defaults to
"Open navigation". A blank or whitespace-only label also falls back to this
visible default. The contained navigation landmark is named "Mobile navigation". Use a clear trigger label and choose another component if the
landmark name must be customized.
The native disclosure supports keyboard toggling. Selecting a link with an
unmodified primary click closes it, whether navigation is handled by the
browser or by onNavigate. Modified clicks retain the browser's normal link
behavior. When onNavigate is supplied, the callback handles only unmodified
primary activation; otherwise native anchor navigation is preserved.
API
| Prop | Required | Default | Description |
|---|---|---|---|
items | Yes | — | Navigation items with id, string label, href, and optional icon or nested children. |
pathname | No | — | Current path used to mark active and current-page links. |
onNavigate | No | — | Callback for unmodified primary link activation. |
label | No | "Open navigation" | Visible text and accessible name of the disclosure trigger. |
className | No | — | Additional class on the disclosure element. |
Choosing a pattern
| Option | Documented fit |
|---|---|
DashboardMobileNavigation | Inline native disclosure and labeled navigation links, with mobile-only visibility and router-independent callback support. |
| React Aria Disclosure | A disclosure built from a heading, trigger button, and panel; use it when the application wants the React Aria disclosure API and composes its own links and navigation landmark. |
| MUI temporary Drawer | An overlay navigation drawer with Escape/overlay dismissal and selection-driven closing through controlled state; use it when a modal or temporary side surface is needed. |
These are different composition patterns, not an overall quality ranking.
DashboardMobileNavigation does not provide an overlay, focus trap, backdrop,
or controlled open-state prop.
React Website Sections
Browse responsive React website sections for marketing, commerce, content, business, and dashboard experiences, with real previews and component references.
Framework Integration
Use Puzzle Pieces sections with Next.js App Router and TanStack Start while keeping server data and client interactions in the right boundary.