Resizable dockable React component that allows creating draggable side panels for layouts. Current stable version is 0.8.0, with infrequent releases. Supports React 16.3+ through 19. Ships TypeScript types. Unlike generic resizable panels, react-dock is purpose-built for docking to edges and dimming overlay modes (opaque, transparent, none). Ideal for sidebars, devtools, or notification panels. Peer dependencies: @types/react and react. Old but stable; no known breaking changes in recent history.
npm install react-dockVerified import paths — ran on the pinned version, not inferred.
Shows basic uncontrolled Dock with toggle button, right-aligned, fluid 30% width.
Set duration prop to match your custom CSS transition duration.
No fix yet; monitor package for React 19 compatibility.
Set onSizeChange callback that updates state. Alternatively, use defaultSize for uncontrolled mode.
Use dimMode='opaque' for click-to-close behavior.
import Dock from 'react-dock';
const Dock = require('react-dock').default;Update to latest react-dock or wrap in non-strict mode.
Use default import: import Dock from 'react-dock';
No dependency data recorded yet.