| style | React.CSSProperties | undefined | — | CSS properties.
⚠️ The default inline styles cannot be overridden, except for [overflow](https://react-resizable-panels.vercel.app/examples/overflow). |
|---|
| className | string | undefined | — | CSS class name.
⚠️ Class is applied to nested HTMLDivElement to avoid styles that interfere with Flex layout. |
|---|
| id | string | undefined | — | Uniquely identifies this panel within the parent group.
Falls back to useId when not provided.
ℹ️ This prop is used to associate persisted group layouts with the original panel.
ℹ️ This value will also be assigned to the id and data-testid attributes; (an explicit data-testid prop will take precedence). |
|---|
| inputMode | "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined | — | Hints at the type of data that might be entered by the user while editing the element or its contents |
|---|
| aria-describedby | string | undefined | — | Identifies the element (or elements) that describes the object. |
|---|
| aria-invalid | boolean | "false" | "true" | "grammar" | "spelling" | undefined | — | Indicates the entered value does not conform to the format expected by the application. |
|---|
| aria-label | string | undefined | — | Defines a string value that labels the current element. |
|---|
| aria-labelledby | string | undefined | — | Identifies the element (or elements) that labels the current element. |
|---|
| children | React.ReactNode | — | Represents all of the things React can render. |
|---|
| collapsedSize | string | number | undefined | — | Panel size when collapsed; defaults to 0%. |
|---|
| collapsedThreshold | string | number | undefined | — | Distance a collapsible panel must be resized past its minSize to collapse,
or past its collapsedSize to expand.
Defaults to half the distance between collapsedSize and minSize.
For example if a panel declares collapsedSize="5%", collapsedThreshold="5%", and minSize="25%",
it will collapse when resized below 20% and expand when resized above 10%.
ℹ️ Interpretation rules:
- Numbers are interpreted as pixels (e.g. minSize={200} is 200 pixels)
- Strings without explicit units are interpreted as percentage (e.g. minSize="50" is 50 percent)
- Use explicit units (e.g. "px", "%", "em", "rem", "vh", or "vw") to change interpretation |
|---|
| collapsible | boolean | undefined | — | This panel can be collapsed.
ℹ️ A collapsible panel will collapse when its size is less than the specified minSize |
|---|
| defaultSize | string | number | undefined | — | Default size of Panel within its parent group; default is auto-assigned based on the total number of Panels.
ℹ️ Interpretation rules:
- Numbers are interpreted as pixels (e.g. defaultSize={200} is 200 pixels)
- Strings without explicit units are interpreted as percentage (e.g. defaultSize="50" is 50 percent)
- Use explicit units (e.g. "px", "%", "em", "rem", "vh", or "vw") to change interpretation
⚠️ Percentage based sizes may cause slight layout shift when server-rendering.
For more information see the documentation. |
|---|
| disabled | boolean | undefined | — | When disabled, a panel cannot be resized either directly or indirectly (by resizing another panel). |
|---|
| elementRef | React.Ref<HTMLDivElement | null> | undefined | — | Ref attached to the root HTMLDivElement. |
|---|
| groupResizeBehavior | "preserve-relative-size" | "preserve-pixel-size" | undefined | — | How should this Panel behave if the parent Group is resized?
Defaults to preserve-relative-size.
- preserve-relative-size: Retain the current relative size (as a percentage of the Group)
- preserve-pixel-size: Retain its current size (in pixels)
ℹ️ Panel min/max size constraints may impact this behavior.
⚠️ A Group must contain at least one Panel with preserve-relative-size resize behavior. |
|---|
| maxSize | string | number | undefined | — | Maximum size of Panel within its parent group; defaults to "100%".
ℹ️ Interpretation rules:
- Numbers are interpreted as pixels (e.g. maxSize={200} is 200 pixels)
- Strings without explicit units are interpreted as percentage (e.g. maxSize="50" is 50 percent)
- Use explicit units (e.g. "px", "%", "em", "rem", "vh", or "vw") to change interpretation |
|---|
| minSize | string | number | undefined | — | Minimum size of Panel within its parent group; defaults to 0%.
ℹ️ Interpretation rules:
- Numbers are interpreted as pixels (e.g. minSize={200} is 200 pixels)
- Strings without explicit units are interpreted as percentage (e.g. minSize="50" is 50 percent)
- Use explicit units (e.g. "px", "%", "em", "rem", "vh", or "vw") to change interpretation |
|---|
| panelRef | React.Ref<import("react-resizable-panels").PanelImperativeHandle | null> | undefined | — | Exposes the following imperative API:
- collapse(): void
- expand(): void
- getSize(): PanelSize
- isCollapsed(): boolean
- resize(size: number | string): void
ℹ️ The usePanelRef and usePanelCallbackRef hooks are exported for convenience use in TypeScript projects. |
|---|