Resizable preview

Interactive preview of the CyberSpec Resizable component. Panels split by a handle that drags or steps with keys.

About this preview

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.

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

Example

"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

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

Resources

View as Markdown