Skip to content

    Browse components

    Splitter

    Resizable split panes with a draggable handle, min/max limits, and full keyboard resizing.

    Open
    Customize
    horizontal
    vertical

    Installation

    npx shadcn@latest add @glint-ui/splitter

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/splitter.json

    Usage

    import { Splitter } from "@/components/ui/splitter";
    
    <Splitter
      defaultSize={30}
      minSize={15}
      maxSize={70}
      start={<Sidebar />}
      end={<Content />}
    />

    Props

    PropTypeDefaultDescription
    startReactNode—First pane (left or top).
    endReactNode—Second pane (right or bottom).
    direction"horizontal" | "vertical""horizontal"Side by side or stacked.
    defaultSizenumber28Initial size of the first pane, in %.
    minSizenumber15Smallest first pane, in %.
    maxSizenumber85Largest first pane, in %.
    stepnumber5% per arrow key press (Shift = 4x).
    labelstring"Resize panels"Accessible name of the handle.
    onResizeReactNode—Called with the new size (%) after a drag or key press.
    classNamestring—Extra classes for the root element.