Skip to content
synccn

Resizable

Panels split by draggable, keyboard-friendly handles.

Sidebar
Editor
Terminal

Installation

$ pnpm dlx shadcn@latest add @synccn/resizable

First time in this project? Connect synccn with one command.

Usage

import { ResizablePanels } from "@/components/ui/resizable";<ResizablePanels defaultSizes={[30, 70]}>…</ResizablePanels>

API reference

Generated from the component's TypeScript types, so it always matches the code.

ResizablePanels

Two or more panels split by draggable handles. sizes are percentages. Handles also respond to arrow keys.

  • direction
    "horizontal" | "vertical"

    Default "horizontal"

    Split side by side or stacked.

  • defaultSizes
    number[]

    Starting sizes as percentages, one per panel.

  • minSize
    number

    Default 15

    Smallest panel size as a percentage.

  • children
    React.ReactNode

    Content to render.

  • className
    string

    Extra classes for the root element.

Dependencies

Read from the component's imports when the site builds. The CLI installs all of these for you.

Helpers

npm packages

Keyboard

  • ←or→or↑or↓Move the focused handle

Accessibility

  • Handles are focusable separators with aria-valuenow.

From the source

Read from this component's code when the site builds, so it can't drift.

  • ARIA roles: separator
  • ARIA attributes: aria-orientation, aria-valuenow
  • Keys handled: ArrowUp, ArrowDown, ArrowLeft, ArrowRight
  • Shows a visible focus ring for keyboard users