@frontplus-ui/use-media-query
Subscribe and respond to media query changes with useMediaQuery.
The useMediaQuery hook leverages the window.matchMedia API to subscribe to CSS media query changes, thereby providing real-time responsiveness to dynamic changes in the viewport or screen orientation. It allows the component to rerender whenever the media query’s result changes. It throws an error if attempted to be used on the server-side (media queries only work in the browser).
Installation
pnpm add @frontplus-ui/use-media-query
# or
yarn add @frontplus-ui/use-media-query
# or
npm i @frontplus-ui/use-media-query
API Reference
is in progress
Licence
This project is licensed under MIT license