{"id":13723148,"url":"https://github.com/xelaok/svelte-media-query","last_synced_at":"2025-10-25T00:30:29.191Z","repository":{"id":47704231,"uuid":"206336424","full_name":"xelaok/svelte-media-query","owner":"xelaok","description":"CSS media queries in Svelte","archived":false,"fork":false,"pushed_at":"2021-10-20T19:18:36.000Z","size":5,"stargazers_count":52,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-31T04:31:50.390Z","etag":null,"topics":["media-queries","svelte","svelte3"],"latest_commit_sha":null,"homepage":"","language":"Svelte","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xelaok.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-04T14:17:41.000Z","updated_at":"2023-11-20T14:21:38.000Z","dependencies_parsed_at":"2022-09-01T09:51:36.599Z","dependency_job_id":null,"html_url":"https://github.com/xelaok/svelte-media-query","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xelaok%2Fsvelte-media-query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xelaok%2Fsvelte-media-query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xelaok%2Fsvelte-media-query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xelaok%2Fsvelte-media-query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xelaok","download_url":"https://codeload.github.com/xelaok/svelte-media-query/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238046773,"owners_count":19407611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["media-queries","svelte","svelte3"],"created_at":"2024-08-03T01:01:36.645Z","updated_at":"2025-10-25T00:30:28.897Z","avatar_url":"https://github.com/xelaok.png","language":"Svelte","funding_links":[],"categories":["components and libraries"],"sub_categories":["layout and structure"],"readme":"## svelte-media-query ([npm](https://www.npmjs.com/package/svelte-media-query), [demo](https://svelte.dev/repl/26eb44932920421da01e2e21539494cd))\nCSS media queries in svelte.\n\n## Installation\n\n```bash\nnpm i svelte-media-query\n```\n\n## Usage\n\n```html\n\u003cscript\u003e\n    import MediaQuery from \"svelte-media-query\";\n\u003c/script\u003e\n\n\u003cMediaQuery query=\"(min-width: 1281px)\" let:matches\u003e\n    {#if matches}\n    \u003cdiv class=\"root default\"\u003e\n        default\n    \u003c/div\u003e\n    {/if}\n\u003c/MediaQuery\u003e\n\n\u003cMediaQuery query=\"(min-width: 481px) and (max-width: 1280px)\" let:matches\u003e\n    {#if matches}\n    \u003cdiv class=\"root tablet\"\u003e\n        tablet\n    \u003c/div\u003e\n    {/if}\n\u003c/MediaQuery\u003e\n\n\u003cMediaQuery query=\"(max-width: 480px)\" let:matches\u003e\n    {#if matches}\n    \u003cdiv class=\"root mobile\"\u003e\n        mobile\n    \u003c/div\u003e\n    {/if}\n\u003c/MediaQuery\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxelaok%2Fsvelte-media-query","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxelaok%2Fsvelte-media-query","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxelaok%2Fsvelte-media-query/lists"}