# ctrlplusb/react-sizeme

Make your React Components aware of their width and height!

Repository: https://github.com/ctrlplusb/react-sizeme
Canonical: https://ross.abutalabs.com/products/react-sizeme
Language: JavaScript
License: MIT
License Family: permissive
Topics: react, react-component, element-queries, element-query, utility
Last push: 2023-03-04T03:38:51+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3795, "days_push": 1278, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1961, forks 92 (observed 2026-08-28T04:05:59.531534+00:00)

## What it is
A small React library that makes components aware of their own rendered width and height, enabling component-level responsive design. It exposes a SizeMe render-prop component and a withSize higher-order component that report element size changes.

## Use cases
- make a react component responsive to its own container size
- render different child components based on element width
- get element width and height in react
- component-level element queries in react
- swap layouts depending on available space in react
- measure a react component's size on resize

## When to choose
- you need components that adapt to wherever they are rendered, not just the viewport
- you want a tiny, performant size-awareness utility with render prop or HOC APIs
- you need broad browser support and SSR compatibility

## When to avoid
- you only need viewport-based responsive design - CSS media queries suffice
- you're starting a new project and prefer actively maintained alternatives like ResizeObserver hooks
- you need container query support natively available in modern CSS

## Facets
- artifact type: library
- maturity: maintenance
- function: ui-components, frontend-framework
- domain: frontend, web-development, web-design
- platform: browser
- tags: react, element-queries, responsive-design, render-prop, higher-order-component, size-detection, nodejs, javascript

## Member repositories
- ctrlplusb/react-sizeme (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:59.531534+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:05:37.418241+00:00, confidence not recorded.
  - readme: https://github.com/ctrlplusb/react-sizeme (fetched 2026-08-28T04:05:59.531534+00:00, sha 60ade33864b5)
  - registry_npm: https://registry.npmjs.org/react-sizeme (fetched 2026-08-29T10:45:53.854948+00:00, sha dc1f0f6d280f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
