KO
|
EN
gitlite โ search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
svelte-media-query
โ 51
Open GitHub โ
CSS media queries in Svelte
Download README (.md)
Explore Similar Repositories
s-offline
:
๐ Simple Svelte component to detect offline & online changes.
svelte-scrolling
:
Lightweight Svelte plugin to scroll to given elements with smooth animations
svelte-form
:
JSON Schema form for Svelte v3
casual-ui
:
An ui components lib that supports React17+, Vue3+ and Svelte3+
svelte-skeleton
:
Simple implementation of SVG skeletons in Svelte 3 :cat:
// repository documentation
Was this content helpful?
โ 0
(0 ratings)
Select Rating:
โ
โ
โ
โ
โ
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
svelte-media-query
?
Download (.md)
## svelte-media-query ([npm](https://www.npmjs.com/package/svelte-media-query), [demo](https://svelte.dev/repl/26eb44932920421da01e2e21539494cd)) CSS media queries in svelte. ## Installation ```bash npm i svelte-media-query ``` ## Usage ```html <script> import MediaQuery from "svelte-media-query"; </script> <MediaQuery query="(min-width: 1281px)" let:matches> {#if matches} <div class="root default"> default </div> {/if} </MediaQuery> <MediaQuery query="(min-width: 481px) and (max-width: 1280px)" let:matches> {#if matches} <div class="root tablet"> tablet </div> {/if} </MediaQuery> <MediaQuery query="(max-width: 480px)" let:matches> {#if matches} <div class="root mobile"> mobile </div> {/if} </MediaQuery> ```