Dashboard Shell

Container-sized app shell whose sidebar collapses to icons with tooltips and a gliding active pill, a top bar with a Mod+K search field and avatar menu, and a content slot with breadcrumbs, title and actions that cross-fades per page; below its own `mobileBelow` width (768px default) the sidebar moves into a Drawer — a data-driven complement to the viewport-height AnimatedSidebar primitives.

Preview

Dashboard Shell preview width

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @karaui/dashboard-shell
@karaui not found? Add it to components.json
{
  "registries": {
    "@karaui": "https://karaui.kamisama-v0.my.id/r/{name}.json"
  }
}

@karaui is in shadcn's public registry directory, so the latest CLI needs no setup. On an older CLI, merge this into the existing file once and every @karaui/… install resolves.

API Reference

nav
DashboardNavGroup[]
—
active?
string

Controlled active nav id.

—
defaultActive?
string
—
onActiveChange?
((id: string) => void)
—
collapsed?
boolean

Controlled desktop collapse (icons only).

—
defaultCollapsed?
boolean
false
onCollapsedChange?
((collapsed: boolean) => void)
—
brand
{ name: string; logo?: ReactNode; }
—
user
{ name: string; email?: string | undefined; avatar?: string | undefined; }
—
userMenu?
DashboardUserMenuItem[]

Avatar menu rows. Defaults to Profile, Settings and Sign out.

[ { id: "profile", label: "Profile", icon: <User aria-hidden /> }, { id: "settings", label: "Settings", icon: <Settings aria-hidden /> }, { id: "sign-out", label: "Sign out", icon: <LogOut aria-hidden />, destructive: true }, ]
searchPlaceholder?
string
Search…
onSearch?
((query: string) => void)

Fires on Enter in the search field.

—
globalShortcut?
boolean

Also focus search on Mod+K anywhere on the page (default: only while focus is inside the shell).

false
breadcrumbs?
BreadcrumbDataItem[]
—
title?
ReactNode
—
description?
ReactNode
—
actions?
ReactNode

Page-header actions (buttons).

—
mobileBelow?
number

Shell width in px below which the sidebar moves into a Drawer behind a menu button. Measured on the shell itself (a CSS container query), not the viewport. Default 768, which matches `md` when the shell spans the page.

768
className?
string
—

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.

Updated