Resizable
glasswave/resizableFreeComponent
Split panes with react-resizable-panels v4 (`Group` / `Panel` / `Separator`).
Live preview
live · rendered by the registry
Rendered by glasswave on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://glasswave.denizisik.com/r/resizable.jsonSource
1"use client";23import { GripVertical } from "lucide-react";4import { forwardRef } from "react";5import { Group, Panel, Separator } from "react-resizable-panels";6import { cn } from "@/lib/utils";78export const ResizablePanelGroup = ({9 className,10 orientation = "horizontal",11 ...props12}: React.ComponentProps<typeof Group> & {13 orientation?: "horizontal" | "vertical";14}) => (15 <Group16 orientation={orientation}17 className={cn(18 "flex h-full w-full data-[orientation=vertical]:flex-col",19 className,20 )}21 {...props}22 />23);2425export const ResizablePanel = Panel;2627export const ResizableHandle = forwardRef<28 HTMLDivElement,29 React.ComponentProps<typeof Separator> & {30 withHandle?: boolean;31 }32>(({ withHandle, className, ...props }, ref) => (33 <Separator34 elementRef={ref}35 className={cn(36 "relative flex w-px items-center justify-center bg-black/10 dark:bg-white/15 outline-none transition-colors after:absolute after:inset-y-0 after:left-1/2 after:w-4 after:-translate-x-1/2 focus-visible:ring-2 focus-visible:ring-blue-500/40 data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full",37 className,38 )}39 {...props}40 >41 {withHandle && (42 <div className="z-10 flex h-7 w-4 items-center justify-center rounded-md border border-black/10 dark:border-white/15 bg-black/[0.04] dark:bg-white/[0.06] shadow-sm">43 <GripVertical className="size-3.5 text-current/50" aria-hidden />44 </div>45 )}46 </Separator>47));48ResizableHandle.displayName = "ResizableHandle";
What it pulls in
npm packages
Files it writes
More from glasswave
All 60 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | glasswave | Components | Free | 2 deps | |
| Alertalert | glasswave | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | glasswave | Components | Free | 1 dep | |
| Aspect Ratioaspect-ratio | glasswave | Components | Free | 1 dep | |
| Avataravatar | glasswave | Components | Free | 1 dep | |
| Badgebadge | glasswave | Components | Free | 1 dep | |
| Breadcrumbbreadcrumb | glasswave | Components | Free | 2 deps | |
| Buttonbutton | glasswave | Components | Free | 2 deps |
