Skip to content

Layout and structure

Sidebar

The application shell navigation — 23 exports covering the rail, the collapsed icon state and the mobile drawer.
Available
Needs mock props
Dual breakpoint

Examples

Rendered live from the maintained Storybook story. Lantern stores only the story id and embeds Storybook rather than duplicating the component or its demo.

Sidebar

Rendered live from Storybook

Storybook must be running for this to load — bun run start:storybook from the monorepo root, or set NEXT_PUBLIC_STORYBOOK_URL to a deployed instance.

Props

The component's public API, read from its TypeScript source. Descriptions come from TSDoc on the prop, so this table cannot drift from the component.

PropTypeDefaultDescription
...propsReact.ComponentProps<"div"> & { side?: "left" | "right"; variant?: "sidebar" | "floating" | "inset"; collapsible?: "offcanvas" | "icon" | "none"; }—Native attributes are forwarded to the underlying element, along with the ref.

Reference

Transcribed from the component audit. If this disagrees with the source, the source is right.

Source
src/components/ui/sidebar.tsx
Portability
Needs its app dependencies replaced by props before it renders in isolation.
Variants
sidebar / floating / insetoffcanvas / icon / noneleft / right
States to cover
expandedcollapsed icon railmobile sheet draweractive itemtooltip when collapsedbadgehover actionskeleton rowssubmenu
Dependencies
@radix-ui/react-slotclass-variance-authoritylucide-react
Props the port adds
isMobile, persist=false (drops the cookie write), enableKeyboardShortcut=false (drops the global ⌘B listener), SidebarMenuSkeleton.width (drops Math.random)
Responsive
Carries a load-bearing max-md: / md: pair. Sign off at both viewports — see the rule.
Notes
The largest single port — 638 lines, responsive pairs on 8 sub-parts, and it needs the whole sidebar-* token family.