Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Harvey.js - A State Manager For CSS Media Queries

DZone's Guide to

Harvey.js - A State Manager For CSS Media Queries

· Web Dev Zone
Free Resource

Try RAD Studio for FREE!  It’s the fastest way to develop cross-platform Native Apps with flexible Cloud services and broad IoT connectivity. Start Your Trial Today!

Harvey.js is a state manager for CSS media queries.  Media queries are great for visual tweaks and simple behavioral switches, but they become difficult to rely on when behaviors change for larger or smaller devices. Harvey helps you monitor and manage those changes by firing an event whenever your media query is activated.

This method is preferable to relying on a screen resize event because you only receive an event when the query is matched - not for every screen resize. Less testing and more doing.



Requirements: None
Demohttp:/ / harvesthq. github. com/ harvey/ #demo
License: Free

Get Your Apps to Customers 5X Faster with RAD Studio. Brought to you in partnership with Embarcadero.

Topics:

Published at DZone with permission of Hirvesh Munogee, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}