🌍 Public
Viewing a saved revision (read-only)
7cdb4be978544274b8ff42a3451f8916
D3 drag test
This example demonstrates a draggable splitter that resizes two adjacent panes in a web layout. Using D3 v5’s `drag` behavior, dragging the central divider horizontally triggers `event.x` to update each pane’s inline width and reposition the splitter via `setOffset`. The panes hold static text, with dimensions computed from the container’s current pixel width. The implementation uses `select`, `selectAll`, and `style` from D3, plus React for overall structure, and plain CSS for layout and hover cursor styling.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.