Responsive Media
2.1.0
2026-10-02
- New: the
responsive-media/nuxtNuxt module. Describe your breakpoints once in theresponsivekey ofnuxt.config.ts(breakpoints,order,debounce,ssrState);useResponsive()anduseBreakpoints()are auto-imported and typed from those breakpoints,useMediaQuery()anduseContainerState()are auto-imported too, and a plugin installs the shared state on the app. See Nuxt Integration. - New:
defineResponsive(config, options?)inresponsive-media/vueandresponsive-media/react. It applies the config and returnsuseResponsiveanduseBreakpoints(plus apluginin Vue) whose state and breakpoint keys are inferred fromconfig, so a typo such asisAbove('nope')is a compile error and no generic has to be written by hand. - New: the
ssrStateoption ofSetConfigOptions. WhenevermatchMediaorResizeObserveris unavailable — on the server — the listed keys take these values instead offalse, so the server can render a layout. It works forcreateResponsiveState(),createContainerState(),setResponsiveConfig()and the Nuxt module. - Types:
useContainerState()infers the keys of its returned state from the config (Vue and React), andBreakpointHelperstakes an optional key type,BreakpointHelpers<K extends string = string>. Existing code keeps compiling. - Fixed: the Vue
useBreakpoints()ignored the configuredorderwhen the state was provided byResponsivePlugin, and fell back to the order of the config keys — socurrentcould name the wrong breakpoint when the two orders differed. The configuredorderis now used. - New optional peer dependency:
@nuxt/kit(^3.9.0 || ^4.0.0), needed only forresponsive-media/nuxt; Nuxt already provides it.