Wrap the Sidebar and the SidebarInset in a SidebarProvider. The provider holds the open state, the cookie, and the keyboard shortcut.
app-shell.tsx
Sidebar
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| side | "left""right" | "left" | The edge: left is the inline start, right the inline end (they swap on a right-to-left page). |
| variant | "floating""inset""sidebar" | "sidebar" | sidebar: a column with a border. floating: a card with 8px around it. inset: the page is a card beside it. |
| collapsible | "icon""none""offcanvas" | "offcanvas" | offcanvas: it slides out. icon: it shrinks to a 48px icon rail. none: it never collapses. |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
SidebarTrigger
<button>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| glass | "clear""dark""light" | — | |||||
| rounded | "default""full" | — | |||||
| size | "default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs" | — | |||||
| variant | "dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary" | — | |||||
| class | string | — | |||||
| busy | boolean | — | The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading. | ||||
| spinner | "center""start" | — | center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label. | ||||
From Base UIButtonBase UI docs | |||||||
| focusable | boolean | false | Whether the button should be focusable when disabled. | ||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |||||
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |||||
| |||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||
SidebarMenuButton
<button>| Prop | Type | Default | Description |
|---|---|---|---|
| size | "default""lg""sm" | "default" | |
| variant | "default""outline" | "default" | |
| is | boolean | false | The current page: the raised chip and data-active. Also set aria-current="page" on a link. |
| tooltip | — | The row tooltip: a string, or the TooltipContent props. It shows at once (no delay), in the one tooltip that glides between rows: on the icon rail always, in the open panel only while the label is cut off. | |
From Base UIUseRenderBase UI docs | |||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. |
SidebarMenuSkeleton
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| show | boolean | false | Show a 16px square in the icon place. |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
SidebarMenuSubButton
<a>| Prop | Type | Default | Description |
|---|---|---|---|
| size | "md""sm" | "md" | md (default) 28px, sm 24px. Text is 14px in both. |
| is | boolean | false | The current page: the raised chip. Also set aria-current="page". |
| tooltip | — | The full label, shown in the row tooltip while the row cuts it off. | |
From Base UIUseRenderBase UI docs | |||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |
| ...props | <a> attributes | — | Every other attribute goes to the <a>, with a ref. |
| ⌘BorCtrlB | Opens or closes the Sidebar. keyboardShortcut changes the letter. |
|---|---|
| EnterorSpace | On SidebarTrigger: opens or closes the Sidebar. |
| Escape | Phone Drawer: closes the Drawer. |



