JSPM

  • Created
  • Published
  • Downloads 68820
  • Score
    100M100P100Q163639F
  • License MIT

Primitives for media query and device features

Package Exports

  • @solid-primitives/media
  • @solid-primitives/media/dist/index.cjs
  • @solid-primitives/media/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@solid-primitives/media) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@solid-primitives/media

lerna size size

Creates a very simple and straightforward media query monitor.

Installation

npm install @solid-primitives/media
# or
yarn add @solid-primitives/media

How to use it

const isSmall = createMediaQuery("(max-width: 767px)");
console.log(isSmall());

Demo

You may view a working example here: https://codesandbox.io/s/solid-media-query-5bf16?file=/src/index.tsx

Changelog

Expand Changelog

0.0.100

Initial release.

1.0.0

Shipped first stable version.

1.1.7

Published with CJS and SSR support.