banana-panels
v0.1.2
Published
Composable React panels for container-scoped workspaces, docked operator consoles, and resizable multi-panel application surfaces.
Readme
banana-panels
Composable React panels for container-scoped workspaces, docked operator consoles, and resizable multi-panel application surfaces.
What This Package Is For
Use banana-panels when your product needs one or more of these patterns:
- draggable and resizable workspace panels
- docked context surfaces anchored to layout corners
- container-scoped panel systems inside application screens
- modal overlays that match the same panel design language
- runtime theming for panel chrome, gradients, typography, and status accents
Install
npm install banana-panels react react-domLive Demo
Production Storybook demo for the npm package:
- https://panels.banana.engineer/
Direct interaction demo route:
- https://panels.banana.engineer/?path=/story/panels-interactions-docking-labels--default
Get Started
The most important integration pattern is:
- create a relatively positioned host element
- mount a
PanelStageinside it - render
ResizablePaneland/orResizableDockGridwithhostMode="container"
import { PanelStage } from 'banana-panels';
import { ResizablePanel } from 'banana-panels/resizable-panel';
export function Example() {
return (
<div style={{ position: 'relative', minHeight: 560 }}>
<PanelStage label="Example workspace">
<ResizablePanel
id="example-panel"
title="Example Panel"
hostMode="container"
x={16}
y={16}
width={360}
height={240}
onMove={() => {}}
onResize={() => {}}
onFocus={() => {}}
onAnchorCommit={() => {}}
>
Container-scoped panel content.
</ResizablePanel>
</PanelStage>
</div>
);
}Common Usage Scenarios
Free Panel Workspace
Use this for builder UIs, control rooms, inspectors, and multi-pane editing surfaces.
Core primitives:
PanelStageResizablePanel
Docked Context Surface
Use this when panels should seed into corners and stay grouped as supporting context around a main task.
Core primitives:
PanelStageResizableDockGrid
Modal or Interruptive Step
Use this when a user needs a temporary overlay that still looks and behaves like the rest of the panel system.
Core primitives:
PanelOverlayPanelBase
Themeable Workspace
Use this when consumers need runtime theming for product skins, branded workspaces, or scenario-based visual presets.
Core primitives:
theme-pipelinetailwind/preset
Storybook Surfaces
Themes
Theme stories show runtime styling systems, visual codenames, and container-scoped panel layouts.
Interactions
Interaction stories now live under Panels / Interactions and are organized around behavioral categories such as drag and snap, docking labels, dialog flows, closable panels, and cross-panel relationships.
Interaction guide:
Package Wiki
Use the package wiki for component-by-component guidance.
Wiki index:
Recommended reading order:
- wiki/getting-started.md
- wiki/components/panel-stage.md
- wiki/components/resizable-panel.md
- wiki/components/resizable-dock-grid.md
- wiki/components/theme-pipeline.md
- wiki/components/panel-overlay.md
- wiki/components/panel-base.md
- wiki/components/composition-and-behavior.md
Public API Overview
Main entrypoints developers typically need:
banana-panelsbanana-panels/panel-stagebanana-panels/resizable-panelbanana-panels/resizable-dock-gridbanana-panels/panel-basebanana-panels/panel-overlaybanana-panels/theme-pipelinebanana-panels/tailwind/preset
Lower-level APIs are available for advanced integrations, but most consumers should start with the primitives above.
Maintainer Notes
Local Storybook:
cp .env.example .env
bun run storybookStatic Storybook build:
bun run build-storybookRepository-root helper commands:
bun run storybook:panels:build
bun run storybook:panels:local
PANELS_STORYBOOK_DEPLOY_USER=<ssh-user> bun run storybook:panels:deployFirst npm publish workflow:
cd src/typescript/packages/panels
bun install
bun run build
npm publish --access public