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 →
64/100Good
Development Activity56
Maintenance36
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
59%
Other

agenta

Developer Tools · Devops · AI Development

4,489

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
TypeScript59%
Python39%
Updated today
TypeScript
48%
AGPL 3.0

Grafana

Monitoring · Analytics

76,300

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
65
Dependency
Built with
TypeScript48%
Go46%
Updated today
TypeScript
71%
Other

highlight.io

Developer Tools · Analytics · Monitoring

9,367

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
66
Dependency
Built with
TypeScript71%
Go16%
Updated yesterday
TypeScript
95%
MIT

HyperDX

Developer Tools · Analytics · Monitoring

9,841

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

View details
87
Repo Health
83
Technical
70
Dependency
Built with
TypeScript95%
Updated today
TypeScript
98%
Other

Langfuse

AI Development · Monitoring

33,366

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 today
Clojure
54%
Other

Metabase

Analytics

48,828

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
Clojure54%
TypeScript40%
Updated today
Python
58%
Apache 2.0

MLflow

AI Development · Monitoring

27,573

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
68
Dependency
Built with
Python58%
TypeScript33%
Updated today
TypeScript
87%
AGPL 3.0

OpenPanel

Analytics

6,698

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

View details
75
Repo Health
74
Technical
69
Dependency
Built with
TypeScript87%
MDX11%
Updated today
Python
47%
Other

Arize Phoenix

Devops · Analytics · Monitoring

11,105

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
68
Dependency
Built with
Python47%
TypeScript41%
Updated today

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