# yocontra/react-responsive

CSS media queries in react - for responsive design, and more.

Repository: https://github.com/yocontra/react-responsive
Canonical: https://ross.abutalabs.com/products/react-responsive
Homepage: https://contra.io/react-responsive
Language: TypeScript
License: MIT
License Family: permissive
Topics: react
Last push: 2025-03-01T21:26:29+00:00

## Health v2 (maintenance only)
Score: 36/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 9, release rhythm 35, longevity 100
- inputs: {"age_days": 4402, "days_push": 550, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7171, forks 293 (observed 2026-08-28T04:09:56.386729+00:00)

## What it is
A React library that lets components respond to CSS media queries via a useMediaQuery hook and a MediaQuery component. It supports camelCase shorthand props, render props, and device forcing for testing responsive layouts.

## Use cases
- render different components for desktop vs mobile in react
- detect screen orientation or retina displays in a react app
- use css media queries as react hooks
- conditionally render ui based on viewport width
- test responsive layouts with a forced device
- build mobile-first responsive react components

## When to choose
- you need JS-driven conditional rendering based on media queries in React
- you want both hook and component APIs with broad browser support
- you need to force a device context for testing or SSR scenarios

## When to avoid
- you only need CSS-only responsive styling without JS logic
- you are not using React
- you prefer a full CSS-in-JS or utility framework that handles breakpoints for you

## Facets
- artifact type: library
- maturity: stable
- function: frontend-framework, ui-components, state-management
- domain: web-development, frontend
- platform: browser
- tags: react, media-queries, responsive-design, hooks, matchmedia, css, viewport, mobile-first, typescript, nodejs, web-server

## Member repositories
- yocontra/react-responsive (main) score 36

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:56.386729+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-29T17:39:56.938571+00:00, confidence not recorded.
  - readme: https://github.com/yocontra/react-responsive (fetched 2026-08-28T04:09:56.386729+00:00, sha 1ca9cd80bc26)
  - homepage: https://contra.io/react-responsive (fetched 2026-08-29T08:35:27.422870+00:00, sha 0c8554036c67)
  - registry_npm: https://registry.npmjs.org/react-responsive (fetched 2026-08-29T08:35:27.425471+00:00, sha d044b05c8216)
- Data as of 2026-08-30T08:39:29.467469+00:00.
