Search

Search components and flows across the catalog

ThatDesignUIOriginalInteractive preview

Collapsible app sidebar

A dark app sidebar with a workspace switcher, search, nested projects and a storage card that collapses to an icon rail with tooltips, toggled with Ctrl/Cmd+B, and becomes a drawer on phones.

Category
Navigation
Platform
Responsive

Interactive componentClick through it, resize it, or switch states. It’s real UI, not a screenshot.Expanded state

Use this component

Free to use. It works on its own in any React and Tailwind project, so you can add it with one command, paste the code, or hand the prompt to your coding agent.

FreeReact 18+Tailwind v3.4 or v4No extra packages

1. Add it with the shadcn CLI

npx shadcn@latest add https://www.thatdesignui.com/r/collapsible-sidebar.json

2. Use it

Every prop is optional
app/page.tsx
import CollapsibleSidebar from "@/components/collapsible-sidebar";

export default function Page() {
  return <CollapsibleSidebar />;
}

Prefer to paste it yourself? Open the .

Under the hood

How it’s built

What’s inside

  1. A 16rem near-black (#111113) sidebar beside a light app page: a gradient workspace tile with name and plan, a collapse button, a search field with a ⌘K hint, a Workspace label and nav items with 18px icons.
  2. The active item has a faint white fill and a 3px indigo bar on the left edge; Inbox has a count; Projects expands to three color-coded sub-items behind a rotating chevron.
  3. At the bottom, a storage card with a gradient meter and an Upgrade button, then Settings and Help.
  4. Collapsed, the sidebar narrows to a 4.5rem icon rail: counts become dots and hovering or focusing an icon shows a dark tooltip beside it.

How it behaves

  • The collapse button and Ctrl/Cmd+B toggle between the full sidebar and the icon rail, and the width animates.
  • In the rail every icon button has an accessible name and a tooltip on hover and focus.
  • Below 640px the sidebar is an off-canvas drawer opened by the menu button, closed by the scrim or Escape.
  • The active item uses aria-current=page and Projects uses aria-expanded.

More from ThatDesignUI

Image gallery lightbox

Image gallery lightbox

ThatDesignUIOriginalMedia component

Notification center

Notification center

ThatDesignUIOriginalNotifications component

Interactive chart card

Interactive chart card

ThatDesignUIOriginalDashboard component

Multi-select combobox

Multi-select combobox

ThatDesignUIOriginalForms component