resizable
9ui/resizableFreeComponent
9ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by 9ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://9ui.dev/r/resizable.jsonSource
1import * as React from "react"2import { GripVerticalIcon } from "lucide-react"3import * as BaseResizable from "react-resizable-panels"45import { cn } from "@/lib/utils"67function ResizablePanelGroup({8 className,9 ...props10}: React.ComponentProps<typeof BaseResizable.PanelGroup>) {11 return (12 <BaseResizable.PanelGroup13 data-slot="resizable-panel-group"14 className={cn(15 "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",16 className17 )}18 {...props}19 />20 )21}2223function ResizablePanel({24 ...props25}: React.ComponentProps<typeof BaseResizable.Panel>) {26 return <BaseResizable.Panel data-slot="resizable-panel" {...props} />27}2829function ResizableHandle({30 withHandle,31 className,32 ...props33}: React.ComponentProps<typeof BaseResizable.PanelResizeHandle> & {34 withHandle?: boolean35}) {36 return (37 <BaseResizable.PanelResizeHandle38 data-slot="resizable-handle"39 className={cn(40 "bg-border focus-visible:ring-ring/50 focus-visible:ring-offset-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 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",41 className42 )}43 {...props}44 >45 {withHandle && (46 <div className="bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border">47 <GripVerticalIcon className="size-2.5" />48 </div>49 )}50 </BaseResizable.PanelResizeHandle>51 )52}5354export { ResizablePanelGroup, ResizablePanel, ResizableHandle }
What it pulls in
npm packages
Files it writes
More from 9ui
All 56 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | 9ui | Components | Free | no deps | |
| alertalert | 9ui | Components | Free | no deps | |
| alert-dialogalert-dialog | 9ui | Components | Free | no deps | |
| aspect-ratioaspect-ratio | 9ui | Components | Free | no deps | |
| autocompleteautocomplete | 9ui | Components | Free | no deps | |
| avataravatar | 9ui | Components | Free | no deps | |
| badgebadge | 9ui | Components | Free | no deps | |
| breadcrumbsbreadcrumbs | 9ui | Components | Free | no deps |
