BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/weekendsuperhero-io/sistine/sidebar

Sidebar

weekendsuperhero-io-sistine/sidebar
UnverifiedComponent

A sidebar component with optional glass material.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/Weekendsuperhero-io/sistine/main/sidebar.json

Source

components/ui/sidebar.tsxraw.githubusercontent.com/Weekendsuperhero-io/sistine/main/sidebar.json · first 6 KB
1"use client";
2
3import { SidebarSimpleIcon } from "@phosphor-icons/react";
4import { cva, type VariantProps } from "class-variance-authority";
5import { Slot as SlotPrimitive } from "radix-ui";
6import * as React from "react";
7
8import { useIsMobile } from "@/hooks/use-mobile";
9import { cn } from "@/lib/utils";
10import { Button } from "./button";
11import { Input } from "./input";
12import { Separator } from "./separator";
13import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "./sheet";
14import { Skeleton } from "./skeleton";
15import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./tooltip";
16
17const SIDEBAR_COOKIE_NAME = "sidebar_state";
18const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
19const SIDEBAR_WIDTH = "16rem";
20const SIDEBAR_WIDTH_MOBILE = "18rem";
21const SIDEBAR_WIDTH_ICON = "3rem";
22const SIDEBAR_KEYBOARD_SHORTCUT = "b";
23
24type SidebarContextProps = {
25 state: "expanded" | "collapsed";
26 open: boolean;
27 setOpen: (open: boolean) => void;
28 openMobile: boolean;
29 setOpenMobile: (open: boolean) => void;
30 isMobile: boolean;
31 toggleSidebar: () => void;
32};
33
34const SidebarContext = React.createContext<SidebarContextProps | null>(null);
35
36function useSidebar() {
37 const context = React.useContext(SidebarContext);
38 if (!context) {
39 throw new Error("useSidebar must be used within a SidebarProvider.");
40 }
41
42 return context;
43}
44
45function SidebarProvider({
46 defaultOpen = true,
47 open: openProp,
48 onOpenChange: setOpenProp,
49 className,
50 style,
51 children,
52 ...props
53}: React.ComponentProps<"div"> & {
54 defaultOpen?: boolean;
55 open?: boolean;
56 onOpenChange?: (open: boolean) => void;
57}) {
58 const isMobile = useIsMobile();
59 const [openMobile, setOpenMobile] = React.useState(false);
60
61 // This is the internal state of the sidebar.
62 // We use openProp and setOpenProp for control from outside the component.
63 const [_open, _setOpen] = React.useState(defaultOpen);
64 const open = openProp ?? _open;
65 const setOpen = React.useCallback(
66 (value: boolean | ((value: boolean) => boolean)) => {
67 const openState = typeof value === "function" ? value(open) : value;
68 if (setOpenProp) {
69 setOpenProp(openState);
70 } else {
71 _setOpen(openState);
72 }
73
74 // This sets the cookie to keep the sidebar state.
75 // biome-ignore lint/suspicious/noDocumentCookie: persist sidebar open/collapsed state across reloads
76// … truncated

What it pulls in

npm packages

  • @phosphor-icons/react
  • class-variance-authority
  • clsx
  • radix-ui
  • tailwind-merge

Other registry items

  • @sistine/button
  • @sistine/input
  • @sistine/separator
  • @sistine/sheet
  • @sistine/skeleton
  • @sistine/theme
  • @sistine/tooltip
  • @sistine/use-mobile

Files it writes

  • lib/utils.ts
  • lib/material.ts
  • lib/hover-effects.ts
  • components/ui/sidebar.tsx

Facts

Registry
weekendsuperhero-io/sistine
Type
registry:component
Access
Unverified
Files written
4
Licence
MIT
In the index
at or before 2026-08-02
Last confirmed
2 days ago

Go to the source

weekendsuperhero.io Weekendsuperhero-io/sistine on GitHub Raw registry item This item as JSON

More from weekendsuperhero-io/sistine

All 71 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Accordionaccordionweekendsuperhero-io/sistineComponentsUnverified5 deps · 4 files
Alertalertweekendsuperhero-io/sistineComponentsUnverified3 deps · 4 files
Alert Dialogalert-dialogweekendsuperhero-io/sistineComponentsUnverified4 deps · 4 files
Auto Foregroundauto-foregroundweekendsuperhero-io/sistineComponentsUnverifiedno deps
Avataravatarweekendsuperhero-io/sistineComponentsUnverified4 deps · 4 files
Badgebadgeweekendsuperhero-io/sistineComponentsUnverified4 deps · 4 files
Breadcrumbbreadcrumbweekendsuperhero-io/sistineComponentsUnverified5 deps · 4 files
Buttonbuttonweekendsuperhero-io/sistineComponentsUnverified4 deps · 4 files

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