@front-ui/use-media-query
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@front-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 @front-ui/use-media-query
# or
yarn add @front-ui/use-media-query
# or
npm i @front-ui/use-media-query

API Reference

is in progress

Licence

This project is licensed under MIT license

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.01latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.01

Package Sidebar

Install

npm i @front-ui/use-media-query

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

5.82 kB

Total Files

7

Last publish

Collaborators

  • zeeshan-uidev