Skip to content
LayoutInteractive playground

Resizable

Panels that users can resize.

Preparing the playground…
Text and Markdown example
Resizable · Example
1<ResizablePanelGroup direction="horizontal" style={{height:200,width:380,border:"1px solid var(--color-border)",borderRadius:8}}><ResizablePanel defaultSize={40} minSize={20}><div style={{padding:20}}>Navigation</div></ResizablePanel><ResizableHandle withHandle /><ResizablePanel minSize={20}><div style={{padding:20}}>Your workspace</div></ResizablePanel></ResizablePanelGroup>
Read documentation in Markdown

How to use it

Set direction on the group and minSize/maxSize on panels. ResizableHandle supports keyboard interaction.

Import

React / Next.js
1import { ResizablePanelGroup, ResizablePanel, ResizableHandle } from "@kivora/nextjs";

Interactive examples run inside a component with "use client". The playground's Copy button includes the imports needed for the current example.

API reference 0.2.0

Types from the installed published version, including component properties and common HTML attributes. “Optional” does not imply a default value; omitting a property lets the component decide.

PropertyTypeDescription
directionRequired"horizontal" | "vertical"Axis along which panels are arranged.
aria-labelstringAccessible name of the control.
autoSaveIdstring | nullConfigures autoSaveId. The type describes the supported values and structure.
childrenReactNodeContent or child elements of the component.
classNamestringAdditional CSS classes to customize the element.
defaultCheckedbooleanInitial selection of the control.
defaultValuestring | number | readonly string[]Initial value when the component manages its own state.
dir"auto" | "ltr" | "rtl"Interface reading direction.
idstring | nullElement identifier; associates labels and descriptions.
keyboardResizeBynumber | nullConfigures keyboardResizeBy. The type describes the supported values and structure.
onChangeChangeEventHandler<keyof HTMLElementTagNameMap, Element>Change event. Check the type: some controls return an object, others a DOM event.
onClickMouseEventHandler<keyof HTMLElementTagNameMap>Action performed when the element is activated.
onLayoutPanelGroupOnLayout | nullCallback for this event. The signature describes its arguments.
onSubmitSubmitEventHandler<keyof HTMLElementTagNameMap>Form submission event.
roleAriaRoleSemantic role of the element. Keep the default role unless a change is justified.
storagePanelGroupStorageConfigures storage. The type describes the supported values and structure.
styleCSSPropertiesReact inline styles.
tabIndexnumberKeyboard focus order and availability.
tagName"object" | "a" | "button" | "div" | "form" | "h2" | "h3" | "img" | "input" | "label" | "li" | "nav" | "ol" | "p" | "select" | "span" | "ul" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "h1" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "ins" | "kbd" | "legend" | "link" | "main" | "map" | "mark" | "menu" | "meta" | "meter" | "noscript" | "optgroup" | "option" | "output" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "search" | "slot" | "script" | "section" | "small" | "source" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "var" | "video" | "wbr"Configures tagName. The type describes the supported values and structure.
titlestringTitle or supplementary information.

Subcomponents and composition

Review each component's properties and published declaration. Native and accessibility attributes are inherited from the element specified by its type.

ResizablePanelGroup20 properties
ResizablePanelGroup · TypeScript
1ResizablePanelGroup: ({ className, ...props }: ResizablePanelGroupProps) => React.JSX.Element
ResizablePanel23 properties
PropertyTypeDescription
aria-labelstringAccessible name of the control.
childrenReactNodeContent or child elements of the component.
classNamestringAdditional CSS classes to customize the element.
collapsedSizenumberConfigures collapsedSize. The type describes the supported values and structure.
collapsiblebooleanAllow closing content or collapsing the panel.
defaultCheckedbooleanInitial selection of the control.
defaultSizenumberInitial panel size.
defaultValuestring | number | readonly string[]Initial value when the component manages its own state.
idstringElement identifier; associates labels and descriptions.
maxSizenumberMaximum panel size.
minSizenumberMinimum panel size.
onChangeChangeEventHandler<HTMLDivElement | HTMLElement | HTMLButtonElement | HTMLParagraphElement | HTMLHeadingElement | HTMLSpanElement | HTMLImageElement | HTMLLIElement | HTMLAnchorElement | HTMLOListElement | HTMLInputElement | HTMLTableElement | HTMLLabelElement | HTMLLegendElement | HTMLFieldSetElement | HTMLUListElement | HTMLObjectElement | HTMLLinkElement | HTMLBaseElement | HTMLMapElement | HTMLProgressElement | HTMLSelectElement | HTMLFormElement | HTMLAreaElement | HTMLAudioElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPreElement | HTMLSlotElement | HTMLScriptElement | HTMLSourceElement | HTMLStyleElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement, Element>Change event. Check the type: some controls return an object, others a DOM event.
onClickMouseEventHandler<HTMLDivElement | HTMLElement | HTMLButtonElement | HTMLParagraphElement | HTMLHeadingElement | HTMLSpanElement | HTMLImageElement | HTMLLIElement | HTMLAnchorElement | HTMLOListElement | HTMLInputElement | HTMLTableElement | HTMLLabelElement | HTMLLegendElement | HTMLFieldSetElement | HTMLUListElement | HTMLObjectElement | HTMLLinkElement | HTMLBaseElement | HTMLMapElement | HTMLProgressElement | HTMLSelectElement | HTMLFormElement | HTMLAreaElement | HTMLAudioElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPreElement | HTMLSlotElement | HTMLScriptElement | HTMLSourceElement | HTMLStyleElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>Action performed when the element is activated.
onCollapsePanelOnCollapseCallback for this event. The signature describes its arguments.
onExpandPanelOnExpandCallback for this event. The signature describes its arguments.
onResizePanelOnResizeCallback for this event. The signature describes its arguments.
onSubmitSubmitEventHandler<HTMLDivElement | HTMLElement | HTMLButtonElement | HTMLParagraphElement | HTMLHeadingElement | HTMLSpanElement | HTMLImageElement | HTMLLIElement | HTMLAnchorElement | HTMLOListElement | HTMLInputElement | HTMLTableElement | HTMLLabelElement | HTMLLegendElement | HTMLFieldSetElement | HTMLUListElement | HTMLObjectElement | HTMLLinkElement | HTMLBaseElement | HTMLMapElement | HTMLProgressElement | HTMLSelectElement | HTMLFormElement | HTMLAreaElement | HTMLAudioElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPreElement | HTMLSlotElement | HTMLScriptElement | HTMLSourceElement | HTMLStyleElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>Form submission event.
ordernumberConfigures order. The type describes the supported values and structure.
roleAriaRoleSemantic role of the element. Keep the default role unless a change is justified.
style(CSSProperties & object)React inline styles.
tabIndexnumberKeyboard focus order and availability.
tagName"object" | "a" | "button" | "div" | "form" | "h2" | "h3" | "img" | "input" | "label" | "li" | "nav" | "ol" | "p" | "select" | "span" | "ul" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "h1" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "ins" | "kbd" | "legend" | "link" | "main" | "map" | "mark" | "menu" | "meta" | "meter" | "noscript" | "optgroup" | "option" | "output" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "search" | "slot" | "script" | "section" | "small" | "source" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "var" | "video" | "wbr"Configures tagName. The type describes the supported values and structure.
titlestringTitle or supplementary information.
ResizablePanel · TypeScript
1ResizablePanel: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement | HTMLDivElement | HTMLObjectElement | HTMLLinkElement | HTMLInputElement | HTMLBaseElement | HTMLMapElement | HTMLProgressElement | HTMLSelectElement | HTMLAnchorElement | HTMLButtonElement | HTMLFormElement | HTMLHeadingElement | HTMLImageElement | HTMLLabelElement | HTMLLIElement | HTMLOListElement | HTMLParagraphElement | HTMLSpanElement | HTMLUListElement | HTMLAreaElement | HTMLAudioElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPreElement | HTMLSlotElement | HTMLScriptElement | HTMLSourceElement | HTMLStyleElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & { 2 className?: string; 3 collapsedSize?: number | undefined; 4 collapsible?: boolean | undefined; 5 defaultSize?: number | undefined; 6 id?: string; 7 maxSize?: number | undefined; 8 minSize?: number | undefined; 9 onCollapse?: ResizablePrimitive.PanelOnCollapse; 10 onExpand?: ResizablePrimitive.PanelOnExpand; 11 onResize?: ResizablePrimitive.PanelOnResize; 12 order?: number; 13 style?: object; 14 tagName?: keyof HTMLElementTagNameMap | undefined; 15} & { 16 children?: React.ReactNode | undefined; 17} & React.RefAttributes<ResizablePrimitive.ImperativePanelHandle>>
ResizableHandle22 properties
PropertyTypeDescription
aria-labelstringAccessible name of the control.
childrenReactNodeContent or child elements of the component.
classNamestringAdditional CSS classes to customize the element.
defaultCheckedbooleanInitial selection of the control.
defaultValuestring | number | readonly string[]Initial value when the component manages its own state.
disabledbooleanDisable interaction with the control.
hitAreaMarginsPointerHitAreaMarginsConfigures hitAreaMargins. The type describes the supported values and structure.
idstring | nullElement identifier; associates labels and descriptions.
onBlur(() => void)Callback for this event. The signature describes its arguments.
onChangeChangeEventHandler<keyof HTMLElementTagNameMap, Element>Change event. Check the type: some controls return an object, others a DOM event.
onClick(() => void)Action performed when the element is activated.
onDraggingPanelResizeHandleOnDraggingCallback for this event. The signature describes its arguments.
onFocus(() => void)Callback for this event. The signature describes its arguments.
onPointerDown(() => void)Callback for this event. The signature describes its arguments.
onPointerUp(() => void)Callback for this event. The signature describes its arguments.
onSubmitSubmitEventHandler<keyof HTMLElementTagNameMap>Form submission event.
roleAriaRoleSemantic role of the element. Keep the default role unless a change is justified.
styleCSSPropertiesReact inline styles.
tabIndexnumberKeyboard focus order and availability.
tagName"object" | "a" | "button" | "div" | "form" | "h2" | "h3" | "img" | "input" | "label" | "li" | "nav" | "ol" | "p" | "select" | "span" | "ul" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "h1" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "ins" | "kbd" | "legend" | "link" | "main" | "map" | "mark" | "menu" | "meta" | "meter" | "noscript" | "optgroup" | "option" | "output" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "search" | "slot" | "script" | "section" | "small" | "source" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "var" | "video" | "wbr"Configures tagName. The type describes the supported values and structure.
titlestringTitle or supplementary information.
withHandlebooleanShow a visual grip on the separator.
ResizableHandle · TypeScript
1declare function ResizableHandle({ className, withHandle, ...props }: ResizableHandleProps): React.JSX.Element;
API generated from @kivora/nextjs 0.2.0View package