React-Resizable

Simple React component for resizing elements with drag handles

Library
npm
v4.0.2
2,583stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
61/100Good
Development Activity48
Maintenance32
Community64
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
76/100Good
Architecture76
Code Quality80
Innovation62
Learning Curve85

React-Resizable is a small, focused React component that makes any element resizable via one or more drag handles. It ships two building blocks: the low-level Resizable wrapper that adds resize behavior to arbitrary children, and the higher-level ResizableBox element that combines Resizable with a styled div for the common case of just wanting a box you can drag to resize.

Maintained under the react-grid-layout organization (the same team behind the popular drag-and-drop grid library), React-Resizable is written in TypeScript, ships its own handle CSS, and is deliberately unopinionated about layout — it only handles the resize interaction itself, leaving positioning and grid behavior to the consuming application or to companion libraries like react-grid-layout.

What You Get

  • A <Resizable> component that adds resize handles and drag tracking to any child element
  • A <ResizableBox> convenience component pairing Resizable with a styled container div
  • Configurable handle positions (corners and edges) via the handle/resizeHandles props
  • Min/max size constraints and aspect-ratio locking during resize
  • Onresize/onresizestart/onresizestop callback props for wiring resize state into parent components
  • Included CSS for handle styling that must be imported alongside the component

Common Use Cases

  • Adding resizable panels or widgets to dashboard and admin UIs
  • Building resizable chart/panel containers in combination with a grid layout system like react-grid-layout
  • Letting users resize image, video, or iframe embeds within a content editor
  • Implementing resizable split-pane or sidebar layouts in React applications

Under The Hood

Architecture The component lives almost entirely in lib/Resizable.tsx (231 lines), which tracks pointer/touch drag state internally and computes new width/height on each move event, clamping to the minConstraints/maxConstraints props and optionally preserving aspect ratio; lib/ResizableBox.tsx (104 lines) is a thin wrapper that renders Resizable around a plain div, applying the current size as inline style so consumers get a ready-to-use resizable box without managing state themselves. lib/utils.ts holds small shared helper functions (clamping, snapping), and lib/propTypes.ts centralizes the exported TypeScript prop types used by both components. Tech Stack Written in TypeScript, compiled via a build.sh script into a build/ directory with .d.ts type declarations, with react as a peer dependency and no other runtime dependencies beyond DOM event handling — it deliberately avoids pulling in a full drag-and-drop library, implementing pointer tracking directly. Code Quality The __tests__/ directory covers both components directly (Resizable.test.tsx, ResizableBox.test.tsx) plus an integration/end-to-end.test.tsx and a dedicated ssr.test.ts verifying the component renders safely under server-side rendering; tests run via Jest with coverage enabled (jest --coverage) and snapshot tests guard rendered markup, and the project enforces eslint + tsc --noEmit typechecking before every version bump via a preversion script. API Design The prop surface is small and consistent between Resizable and ResizableBox (width/height, onResize/onResizeStart/onResizeStop, minConstraints/maxConstraints, resizeHandles), and the README documents both components with runnable examples, keeping the learning curve low for a single, well-scoped interaction pattern.

Used by 17 apps in this directory

TypeScript
60%
Other

agenta

Developer Tools · Devops · AI Development

4,706

The open-source LLMOps platform unifying prompt engineering, evaluation, and observability for teams building reliable LLM applications.

View details
91
Repo Health
77
Technical
67
Dependency
Built with
TypeScript60%
Python38%
Updated yesterday
TypeScript
49%
AGPL 3.0

Grafana

Monitoring · Analytics

76,643

The open-source observability platform that unifies metrics, logs, and traces from any data source into dynamic, queryable dashboards.

View details
95
Repo Health
91
Technical
63
Dependency
Built with
TypeScript49%
Go45%
Updated today
TypeScript
71%
Other

highlight.io

Developer Tools · Analytics · Monitoring

9,372

Open-source full-stack monitoring that unifies session replay, error tracking, logging, and distributed tracing so you can stop context-switching between tools.

View details
69
Repo Health
78
Technical
65
Dependency
Built with
TypeScript71%
Go16%
Updated 2 weeks ago
TypeScript
96%
MIT

HyperDX

Developer Tools · Analytics · Monitoring

9,873

Open source observability platform that unifies logs, traces, metrics, and session replays on ClickHouse — now the core of ClickStack.

View details
88
Repo Health
83
Technical
68
Dependency
Built with
TypeScript96%
Updated yesterday
TypeScript
98%
Other

Langfuse

AI Development · Monitoring

34,264

Open source AI engineering platform for LLM observability, prompt management, evaluation, and debugging — self-host in minutes or use Langfuse Cloud.

View details
92
Repo Health
81
Technical
66
Dependency
Built with
TypeScript98%
Updated yesterday
Clojure
55%
Other

Metabase

Analytics

49,109

The open-source BI platform that lets anyone ask questions and build dashboards without writing SQL — with an embedded analytics SDK and AI-powered query assistant included.

View details
95
Repo Health
84
Technical
65
Dependency
Built with
Clojure55%
TypeScript40%
Updated today
Python
57%
Apache 2.0

MLflow

AI Development · Monitoring

27,837

The open source AI engineering platform for debugging, evaluating, monitoring, and optimizing production LLMs and agents at scale.

View details
97
Repo Health
86
Technical
67
Dependency
Built with
Python57%
TypeScript35%
Updated today
TypeScript
88%
AGPL 3.0

OpenPanel

Analytics

6,884

Open-source Mixpanel alternative with session replay, MCP integration, and privacy-first product analytics you fully control.

View details
74
Repo Health
74
Technical
68
Dependency
Built with
TypeScript88%
Updated 3 days ago
Python
48%
Other

Arize Phoenix

Devops · Analytics · Monitoring

11,346

Open-source AI observability platform for tracing, evaluating, and debugging LLM applications with built-in intelligence and MCP support.

View details
90
Repo Health
88
Technical
67
Dependency
Built with
Python48%
TypeScript41%
Updated yesterday

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search