HextaUI

Resizable: Visible grip

withHandle keeps the grip showing instead of revealing it on hover.

Preview
Code
import {
  ResizableHandle,
  ResizablePanel,
  ResizablePanelGroup,
} from "@/components/ui/resizable"

export function ResizableWithHandle() {
  return (
    <div className="h-56 w-full max-w-md overflow-hidden rounded-xl border">
      <ResizablePanelGroup>
        <ResizablePanel defaultSize="40%" minSize="20%">
          <div className="flex h-full items-center justify-center text-sm font-medium">
            Preview
          </div>
        </ResizablePanel>
        <ResizableHandle withHandle />
        <ResizablePanel minSize="20%">
          <div className="flex h-full items-center justify-center text-sm font-medium">
            Code
          </div>
        </ResizablePanel>
      </ResizablePanelGroup>
    </div>
  )
}

This adds the example as components/examples/resizable/handle.tsx, together with the Resizable component and the HextaUI theme tokens it needs.

pnpm dlx shadcn@latest add https://hextaui.com/r/resizable-handle.json

To add only the component, follow the Resizable installation.

Props in this example

The Resizable props this example sets, from the API reference.

PropTypeDefault
defaultSize
number | string–
minSize
number | string–
PropTypeDefault
withHandleAlways show the grip.
booleanfalse

Every prop is in the Resizable API reference.

See them all, with keyboard support and accessibility notes, on the Resizable page.