Sidebar Glass
shadcn-glass-ui/sidebar-glassFreeComponent
SidebarGlass Core Components
Install it
npx shadcn@latest add https://raw.githubusercontent.com/artyhoo/shadcn-glass-ui-library/main/public/r/sidebar-glass.jsonSource
1/**2 * SidebarGlass Core Components3 *4 * Layout components for building sidebars with glassmorphism effects.5 * **100% API compatible with shadcn/ui Sidebar.**6 *7 * ## Features8 * - shadcn/ui Sidebar API compatibility9 * - Theme-aware glassmorphism styling (glass/light/aurora)10 * - Compound component API (13+ sub-components)11 * - Three collapsible modes: offcanvas, icon, none12 * - Three variants: sidebar (default), floating, inset13 * - Left/right side positioning14 * - Mobile drawer (automatic ModalGlass integration)15 * - Keyboard shortcut (Cmd/Ctrl + B to toggle)16 * - Cookie persistence for open/closed state17 * - Nested submenu support18 * - Loading skeletons19 * - Badge notifications20 *21 * ## CSS Variables22 * - `--sidebar-width` - Desktop width (default: `16rem`)23 * - `--sidebar-width-mobile` - Mobile drawer width (default: `18rem`)24 * - `--sidebar-width-icon` - Icon mode width (default: `3rem`)25 * - `--sidebar-bg` - Background color26 * - `--sidebar-border` - Border color27 * - `--sidebar-primary` - Primary accent color28 * - `--sidebar-primary-foreground` - Primary text color29 * - `--sidebar-accent` - Hover background30 * - `--sidebar-accent-foreground` - Hover text color31 * - `--sidebar-ring` - Focus ring color32 * - `--sidebar-glow` - Box shadow with glow effect33 * - `--sidebar-backdrop-blur` - Backdrop blur amount34 * - `--sidebar-foreground` - Text color35 *36 * @since v1.0.037 * @module sidebar-glass38 */3940import {41 forwardRef,42 type ReactNode,43 type CSSProperties,44 type ComponentPropsWithoutRef,45} from 'react';46import { PanelLeft } from 'lucide-react';47import { Slot } from '@radix-ui/react-slot';48import { cn } from '@/lib/utils';49import {50 useSidebar,51 type SidebarSide,52 type SidebarVariant,53 type SidebarCollapsible,54} from './sidebar-context';55import { ModalGlass } from '@/components/glass/ui/modal-glass';56import '@/glass-theme.css';5758// ========================================59// SIDEBAR ROOT60// ========================================6162export interface SidebarRootProps extends ComponentPropsWithoutRef<'aside'> {63 children: ReactNode;64 /** Override side from provider */65 side?: SidebarSide;66 /** Override variant from provider */67 variant?: SidebarVariant;68 /** Override collapsible from provider */69 collapsible?: SidebarCollapsible;70}7172/**73 * SidebarGlass.Root - Main sidebar container74 *75 * @example76 * ```tsx77 * <SidebarGlass.Root>78 * <SidebarGlass.Header />79 * <SidebarGlass.Content>...</SidebarGlass.Content>80// … truncated
More from shadcn-glass-ui
All 76 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Alert Glassalert-glass | shadcn-glass-ui | Components | Free | no deps | |
| Animated Background Glassanimated-background-glass | shadcn-glass-ui | Components | Free | no deps | |
| Avatar Glassavatar-glass | shadcn-glass-ui | Components | Free | no deps | |
| Badge Glassbadge-glass | shadcn-glass-ui | Components | Free | no deps | |
| Base Progress Glassbase-progress-glass | shadcn-glass-ui | Components | Free | no deps | |
| Button Glassbutton-glass | shadcn-glass-ui | Components | Free | no deps | |
| Card Glasscard-glass | shadcn-glass-ui | Components | Free | no deps | |
| Checkbox Glasscheckbox-glass | shadcn-glass-ui | Components | Free | no deps |
