--- title: Resizable description: Accessible resizable panel groups and layouts with keyboard support. component: true links: doc: https://github.com/bvaughn/react-resizable-panels api: https://github.com/bvaughn/react-resizable-panels/tree/main/packages/react-resizable-panels --- ## About The `Resizable` component is built on top of [react-resizable-panels](https://github.com/bvaughn/react-resizable-panels) by [bvaughn](https://github.com/bvaughn). ## Installation CLI Manual ```bash npx shadcn@latest add resizable ``` Install the following dependencies: ```bash npm install react-resizable-panels ``` Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ```tsx showLineNumbers import { ResizableHandle, ResizablePanel, ResizablePanelGroup, } from "@/components/ui/resizable" ``` ```tsx showLineNumbers One Two ``` ## Examples ### Vertical Use the `direction` prop to set the direction of the resizable panels. ```tsx showLineNumbers {9} import { ResizableHandle, ResizablePanel, ResizablePanelGroup, } from "@/components/ui/resizable" export default function Example() { return ( One Two ) } ``` ### Handle You can set or hide the handle by using the `withHandle` prop on the `ResizableHandle` component. ```tsx showLineNumbers {11} import { ResizableHandle, ResizablePanel, ResizablePanelGroup, } from "@/components/ui/resizable" export default function Example() { return ( One Two ) } ```