Sidebar: App shell
A store admin sidebar. SidebarMenuCollapsible keeps the row a link and opens its pages from a separate chevron, SidebarMenuBadge takes a count that becomes a dot in icon mode, SidebarMenuFlyout opens the pages beside the icon rail, and SidebarCard holds a dismissible card that hides in icon mode and on short screens.
This adds the example as components/examples/sidebar/app-shell.tsx, together with the Sidebar component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/sidebar-app-shell.jsonTo add only the component, follow the Sidebar installation.
Props in this example
The Sidebar props this example sets, from the API reference.
| Prop | Type | Default |
|---|---|---|
collapsible | "offcanvas" | "icon" | "none" | "offcanvas" |
| Prop | Type | Default |
|---|---|---|
isActiveHighlights it and sets aria-current="page". | boolean | false |
tooltipShown while collapsed to icons. Content slides between items as you move along the menu. | ReactNode | TooltipContentProps | – |
| Prop | Type | Default |
|---|---|---|
countA number that rolls when it changes. Zero hides the badge, and in icon mode it becomes a dot. | number | – |
labelRead after the count, like 12 unfulfilled. | string | – |
| Prop | Type | Default |
|---|---|---|
onDismissShows a dismiss button. Called after the card collapses. | () => void | – |
dismissLabelThe dismiss button's label. | string | "Dismiss" |
Every prop is in the Sidebar API reference.
- Variants
- Collapsible
- Collapsible groups and submenus
- Right side
- Under a header
- Controlled
- Loading
- Right to left
See them all, with keyboard support and accessibility notes, on the Sidebar page.
- ButtonButtons in every variant and size, with a built-in loading, success and error flow that skips the spinner for fast requests.
- CollapsibleA panel that shows and hides with height motion you can reverse mid-way, without jumping the layout.
- Dropdown menuA menu of actions and options behind a button, with groups, submenus, checkbox and radio items, and shortcuts.
- HotkeyParse, label, announce and match keyboard shortcuts, with ⌘ on Apple platforms and Ctrl everywhere else.
- InputA text input with three sizes, invalid and read-only states, native validation styling and a 16px touch font so phones never zoom in.
- Number flowAnimated numbers where only the changed digits spin, with any Intl format and locale.