SSR-safe responsive toolkit for TypeScript

Typed breakpoints, container queries, fluid typography, and user preference hooks. One API across 8 frameworks. Zero runtime deps.

SSR-safe Zero deps 8 frameworks TypeScript strict
npm install reflow
40+
Hooks & utilities
8
Framework adapters
0
Runtime deps
100%
TypeScript strict

What you get

useBreakpoint

Typed breakpoints

Define breakpoints once. Get typed keys, active detection, above/below/between checks. Mobile-first.

useContainerQuery

Container queries

Track element size with ResizeObserver. React, Vue, Svelte, Solid adapters included.

fluidClamp

Fluid typography

Generate clamp() values from min/max px and viewport bounds. No magic numbers.

useColorScheme

User preferences

Detect color scheme, reduced motion, contrast, forced colors, pointer type. All reactive.

ResponsiveProvider

SSR-safe

Server snapshot support. No hydration mismatch warnings. No typeof window checks.

useResponsiveValue

Responsive values

Pass an object keyed by breakpoint, get the matching value back. Works in any framework.

One API, every framework

FrameworkEntryStatus
Reactreflow/reactFull hooks + components
Vue 3reflow/vueComposables + plugin
Svelte 5reflow/svelteStores
Solidreflow/solidCore + responsive hooks
Qwikreflow/qwikCore functions
Preactreflow/preactReact-compatible
Angularreflow/angularCore functions
Litreflow/litCore functions

Quick example

import { ResponsiveProvider, useBreakpoint, useResponsiveValue } from "reflow/react";
import { fluidClamp } from "reflow/styles";

function App() {
  const bp = useBreakpoint();
  const cols = useResponsiveValue({ xs: 1, md: 2, xl: 4 });

  return (
    <main style={{ fontSize: fluidClamp({ minPx: 16, maxPx: 22 }) }}>
      <p>Breakpoint: {bp.active}</p>
      <Grid columns={cols} />
    </main>
  );
}

export default () => (
  <ResponsiveProvider serverWidth={1024}>
    <App />
  </ResponsiveProvider>
);

Why reflow

vs react-responsive

Reflow gives you more than media queries: container queries, fluid typography, user preferences, and SSR helpers. Works in 8 frameworks, not just React.

vs usehooks-ts

Reflow is a focused responsive toolkit, not a grab bag. Every API is typed, SSR-safe, and framework-agnostic. Zero deps means zero conflicts.

Full comparison: reflow vs react-responsive vs @vueuse/core vs usehooks-ts