resizable
gmhlab/resizableFreeComponent
gmhlab publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/gmhlab/monorepo/main/packages/ui/public/r/resizable.jsonSource
1"use client"23import { GripVerticalIcon } from "lucide-react"4import * as ResizablePrimitive from "react-resizable-panels"56import { cn } from "@/lib/utils"78function ResizablePanelGroup({9 className,10 ...props11}: ResizablePrimitive.GroupProps) {12 return (13 <ResizablePrimitive.Group14 data-slot="resizable-panel-group"15 className={cn(16 "flex h-full w-full aria-[orientation=vertical]:flex-col",17 className18 )}19 {...props}20 />21 )22}2324function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {25 return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />26}2728function ResizableHandle({29 withHandle,30 className,31 ...props32}: ResizablePrimitive.SeparatorProps & {33 withHandle?: boolean34}) {35 return (36 <ResizablePrimitive.Separator37 data-slot="resizable-handle"38 className={cn(39 "bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90",40 className41 )}42 {...props}43 >44 {withHandle && (45 <div className="bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border">46 <GripVerticalIcon className="size-2.5" />47 </div>48 )}49 </ResizablePrimitive.Separator>50 )51}5253export { ResizableHandle, ResizablePanel, ResizablePanelGroup }
What it pulls in
npm packages
Files it writes
More from gmhlab
All 64 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | gmhlab | Components | Free | 2 deps | |
| alertalert | gmhlab | Components | Free | 1 dep | |
| alert-dialogalert-dialog | gmhlab | Components | Free | 1 dep | |
| aspect-ratioaspect-ratio | gmhlab | Components | Free | 1 dep | |
| avataravatar | gmhlab | Components | Free | 1 dep | |
| badgebadge | gmhlab | Components | Free | 2 deps | |
| breadcrumbbreadcrumb | gmhlab | Components | Free | 2 deps | |
| buttonbutton | gmhlab | Components | Free | 2 deps |
