Skip to content

standard-library/kefir-matches-media

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kefir.matchesMedia

Wraps the browser matchMedia API in a Kefir property stream. The resulting property is the boolean value equal to the media query match.

Installation

yarn add @standard-library/kefir-matches-media

Usage

import matchesMedia from "@standard-library/kefir-matches-media";

const isNarrow = matchesMedia(window, "(max-width: 500px)");
// <value> true
// ... resize browser to be narrow
// <value> false

About

Kefir wrapper around matchMedia API

Resources

License

Stars

Watchers

Forks

Packages

No packages published