# Resizable

Panels split by a handle that drags or steps with keys.

[View Resizable on CyberSpec](https://www.cyberspec.dev/components/sidebar/resizable)

## Component

Resizable belongs to the Layout group in the CyberSpec catalog. It uses @ui-sdk/react/resizable.

## Installation

Use a React 19 project with shadcn configured. Render the installed components inside the Cyber root, and import your global stylesheet in the app entry point.

```sh
bunx --bun shadcn@latest add https://www.cyberspec.dev/r/resizable.json
```

## Example

```tsx
"use client"

import { Resizable } from "@/components/ui/resizable"

export default function ResizableDemo() {
  return (
    <>
      <Resizable
        panes={[
          {
            label: "Routes",
            defaultSize: 38,
            minSize: 24,
            content: (
              <ul>
                <li>Glasswater relay</li>
                <li>Cinder Row drop</li>
                <li>The Stacks, level 9</li>
              </ul>
            ),
          },
          {
            label: "Detail",
            minSize: 30,
            content: (
              <p>
                Rooftop mast over the canal. One guard, changes at four. Dex can hold the van on the east side for six minutes.
              </p>
            ),
          },
        ]}
      />
    </>
  )
}
```

## Install this example

```sh
bunx --bun shadcn@latest add https://www.cyberspec.dev/r/resizable-demo.json
```

## Resources

- [Interactive Resizable preview](https://www.cyberspec.dev/preview/resizable)
- [Component catalog](https://www.cyberspec.dev/components.md)
- [Resizable source code](https://github.com/agnelnieves/cyberspec/blob/main/registry/cyber/ui/resizable.tsx)
- [Shadcn registry item](https://www.cyberspec.dev/r/resizable.json)
