BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/Quantumblack Design System Registry/sidebar
This component no longer exists. It was in Quantumblack Design System Registry’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-08 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.

Sidebar

quantumblack-design-system-registry/sidebar
RemovedComponent

Composable sidebar with collapsible sections, mobile sheet, and icon mode. shadcn API.

Install it

npx shadcn@latest add http://designsystem.quantumblack.com/r/sidebar.json

Source

src/components/ui/sidebar.tsxdesignsystem.quantumblack.com/r/sidebar.json · first 6 KB
1'use client';
2
3import { Slot } from '@radix-ui/react-slot';
4import { type VariantProps, cva } from 'class-variance-authority';
5import * as React from 'react';
6
7import { Button } from '@/components/ui/button';
8import { Icon } from '@/components/ui/icon';
9import { IconShell } from '@/components/ui/icon-shell';
10import { Input } from '@/components/ui/input';
11import { Separator } from '@/components/ui/separator';
12import {
13 Sheet,
14 SheetContent,
15 SheetDescription,
16 SheetHeader,
17 SheetTitle,
18} from '@/components/ui/sheet';
19import { Skeleton } from '@/components/ui/skeleton';
20import {
21 Tooltip,
22 TooltipContent,
23 TooltipProvider,
24 TooltipTrigger,
25} from '@/components/ui/tooltip';
26import { useIsMobile } from '@/hooks/use-mobile';
27import { cn } from '@/lib/utils';
28
29const SIDEBAR_COOKIE_NAME = 'sidebar_state';
30const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
31const SIDEBAR_WIDTH = '16rem';
32const SIDEBAR_WIDTH_MOBILE = '18rem';
33const SIDEBAR_KEYBOARD_SHORTCUT = 'b';
34
35const sidebarIconWidth = {
36 default: '4rem',
37 lg: '5rem',
38} as const;
39
40type SidebarSize = keyof typeof sidebarIconWidth;
41
42function sidebarSizeStyle(size: SidebarSize, fullWidth = false) {
43 const width = sidebarIconWidth[size];
44
45 return {
46 '--sidebar-width-icon': width,
47 ...(fullWidth ? { '--sidebar-width': width } : {}),
48 } as React.CSSProperties;
49}
50
51type SidebarContextProps = {
52 state: 'expanded' | 'collapsed';
53 open: boolean;
54 setOpen: (open: boolean) => void;
55 openMobile: boolean;
56 setOpenMobile: (open: boolean) => void;
57 isMobile: boolean;
58 toggleSidebar: () => void;
59 size: SidebarSize;
60};
61
62const SidebarContext = React.createContext<SidebarContextProps | null>(null);
63
64function useSidebar() {
65 const context = React.useContext(SidebarContext);
66 if (!context) {
67 throw new Error('useSidebar must be used within a SidebarProvider.');
68 }
69
70 return context;
71}
72
73function SidebarProvider({
74 defaultOpen = true,
75 open: openProp,
76 onOpenChange: setOpenProp,
77 size = 'default',
78 className,
79 style,
80 children,
81 ...props
82}: React.ComponentProps<'div'> & {
83 defaultOpen?: boolean;
84 open?: boolean;
85 onOpenChange?: (open: boolean) => void;
86 size?: SidebarSize;
87}) {
88 const isMobile = useIsMobile();
89 const [openMobile, setOpenMobile] = React.useState(false);
90
91 // This is the internal state of the sidebar.
92 // We use openProp and setOpenProp for control from outside the component.
93 const [_open, _setOpen] = React.useState(defaultOpen);
94 const open = openProp ?? _open;
95// … truncated

What it pulls in

npm packages

  • @radix-ui/react-dialog
  • @radix-ui/react-slot
  • class-variance-authority

Other registry items

  • /r/theme.json
  • /r/utils.json
  • /r/button.json
  • /r/icon.json
  • /r/icon-shell.json
  • /r/separator.json
  • /r/tooltip.json
  • /r/input.json
  • /r/sheet.json
  • /r/skeleton.json

Files it writes

  • src/components/ui/sidebar.tsx
  • src/hooks/use-mobile.ts

Facts

Registry
Quantumblack Design System Registry
Type
registry:ui
Access
Free
Files written
2
Licence
NOASSERTION
In the index
at or before 2026-08-03
Last confirmed
11 days ago

Go to the source

designsystem.quantumblack.com mckinsey/quantumblack-design-system on GitHub Raw registry item This item as JSON

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex