drag-pane

Automate drag-to-resize pane interactions for Go-based two-pane plugin layouts.

1.0k|79|Updated Dec 26, 2025
One-click install
npx skills add https://github.com/marcus/sidecar --skill drag-pane
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: drag-pane
Source: https://github.com/marcus/sidecar/tree/main/.claude/skills/drag-pane
Command: npx skills add https://github.com/marcus/sidecar --skill drag-pane

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Drag-to-resize pane interactions in two-pane plugin layouts are often manual and error-prone; this skill provides a structured approach to implement and manage drag-based resizing with proper state persistence.

Core Features & Use Cases

  • Drag-to-resize support for two-pane plugin layouts (sidebar + main content)
  • Hit-region registration, drag delta calculation, width clamping, and lazy state initialization
  • Clear guidance for implementing in Go-based plugin with per-plugin persisted widths

Quick Start

Drag the divider between panes to resize the left and right panes.

Frequently Asked Questions about drag-pane

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement drag-to-resize functionality for a two-pane layout in Go?▼

Drag-to-resize in a two-pane Go layout requires registering mouse hit-regions on the divider, calculating drag deltas to adjust pane widths, clamping widths to valid ranges, and using lazy initialization to persist plugin state across sessions.

What is hit-region registration for pane resizing and when do I need it?▼

Hit-region registration defines the interactive area on a pane divider that captures mouse drag events, which is needed when building two-pane UI layouts that allow users to dynamically adjust sidebar and main content widths.

How do I persist resized pane widths per plugin in a Go-based UI layout?▼

Persist resized pane widths per plugin by using lazy state initialization to save width values after drag delta calculations, ensuring the two-pane layout restores its previous sidebar and main content dimensions upon reload.

Can I use width clamping to prevent panes from collapsing during a drag resize?▼

Width clamping enforces minimum and maximum pane boundaries during drag delta calculation, preventing the sidebar and main content panes in a two-pane layout from collapsing entirely or exceeding window limits during mouse resizing.

Does this drag pane approach work for plugin development interfaces beyond standard layouts?▼

Yes, this drag pane approach applies specifically to plugin development requiring draggable pane resizing across Go-based two-pane interfaces, handling state persistence and hit-regions for any sidebar and main content layout.