tuil
ReferenceComponentsLayout and panes

ResizablePane

ResizablePane component API, behavior, and executable example.

View rawEdit

Loading executable example…

API and events

Build capability-aware rows, columns, bounded containers, split panes, and keyboard-resizable regions.

export function ResizablePane({
  children,
  direction = "horizontal",
  extent,
  defaultExtent = 40,
  minSize = 1,
  maxSize = 200,
  resizeStep = 1,
  onSizeChange,
  autoFocus,
  slots,
  slotProps,
  disabled = false,
  readOnly = false,
  ...props
}: ResizablePaneProps): ReactNode;

Props, functions, and events

MemberTypeRequiredDescriptionRelated types
childrenReactNodeNoThe children member uses the ReactNode contract.
direction"horizontal" | "vertical" | undefinedNoThe direction member uses the "horizontal" | "vertical" | undefined contract.
extentnumber | undefinedNoThe extent member uses the number | undefined contract.
defaultExtentnumber | undefinedNoThe defaultExtent member uses the number | undefined contract.
minSizenumber | undefinedNoThe minSize member uses the number | undefined contract.
maxSizenumber | undefinedNoThe maxSize member uses the number | undefined contract.
resizeStepnumber | undefinedNoThe resizeStep member uses the number | undefined contract.
onSizeChange((size: number) => void | Promise<void>) | undefinedNoThe onSizeChange member uses the ((size: number) => void | Promise<void>) | undefined contract.
autoFocusboolean | undefinedNoThe autoFocus member uses the boolean | undefined contract.
variantstring | undefinedNoThe variant member uses the string | undefined contract.
size"sm" | "md" | "lg" | undefinedNoThe size member uses the "sm" | "md" | "lg" | undefined contract.
unstyledboolean | undefinedNoThe unstyled member uses the boolean | undefined contract.
classNamestring | undefinedNoThe className member uses the string | undefined contract.
layoutPartial<Omit<LayoutNodeInput, "children" | "id" | "semantics">> | undefinedNoThe layout member uses the Partial<Omit<LayoutNodeInput, "children" | "id" | "semantics">> | undefined contract.
idstring | undefinedNoThe id member uses the string | undefined contract.
testIdstring | undefinedNoThe testId member uses the string | undefined contract.
roleSemanticRole | undefinedNoThe role member uses the SemanticRole | undefined contract.SemanticRole
labelstring | undefinedNoThe label member uses the string | undefined contract.
descriptionstring | undefinedNoThe description member uses the string | undefined contract.
disabledboolean | undefinedNoThe disabled member uses the boolean | undefined contract.
readOnlyboolean | undefinedNoThe readOnly member uses the boolean | undefined contract.
selectedboolean | undefinedNoThe selected member uses the boolean | undefined contract.
checkedboolean | undefinedNoThe checked member uses the boolean | undefined contract.
expandedboolean | undefinedNoThe expanded member uses the boolean | undefined contract.
valueTextstring | undefinedNoThe valueText member uses the string | undefined contract.
slotsPartial<SlotComponents<&#123; root: import("ink").BoxProps; content: import("ink").BoxProps; handle: import("ink").TextProps; &#125;>> | undefinedNoThe slots member uses the Partial<SlotComponents<&#123; root: import("ink").BoxProps; content: import("ink").BoxProps; handle: import("ink").TextProps; &#125;>> | undefined contract.BoxProps, SlotComponents, TextProps
slotPropsPartial<SlotProps<&#123; root: import("ink").BoxProps; content: import("ink").BoxProps; handle: import("ink").TextProps; &#125;, &#123; readonly focused: boolean; readonly size: number; &#125;>> | undefinedNoThe slotProps member uses the Partial<SlotProps<&#123; root: import("ink").BoxProps; content: import("ink").BoxProps; handle: import("ink").TextProps; &#125;, &#123; readonly focused: boolean; readonly size: number; &#125;>> | undefined contract.BoxProps, SlotProps, TextProps

ResizablePane reports size changes through onSizeChange; other layout components are passive.

Callback props run after the documented input is accepted. Callbacks are not cancellable unless their return type or description states otherwise.

Interaction and capabilities

Resizable panes consume scoped arrow-key input while passive layout primitives only project Ink layout props.

The published manifest records keyboard, focus, pointer, theme, terminal, semantic, event, and dependency requirements.

Complete import

import { ResizablePane } from "@/components/tuil/primitives/box";

On this page