{"id":20729287,"url":"https://github.com/yukioru/react-queries","last_synced_at":"2026-04-02T02:59:59.621Z","repository":{"id":35061837,"uuid":"202190411","full_name":"Yukioru/react-queries","owner":"Yukioru","description":"React component for manipulate media queries","archived":false,"fork":false,"pushed_at":"2023-01-04T07:11:43.000Z","size":1086,"stargazers_count":5,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T20:17:33.703Z","etag":null,"topics":["media","mediaqueries","queries","query","react","tiny"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/Yukioru.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-13T17:12:09.000Z","updated_at":"2020-11-12T11:07:08.000Z","dependencies_parsed_at":"2023-01-15T13:01:13.300Z","dependency_job_id":null,"html_url":"https://github.com/Yukioru/react-queries","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/Yukioru%2Freact-queries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukioru%2Freact-queries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukioru%2Freact-queries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukioru%2Freact-queries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yukioru","download_url":"https://codeload.github.com/Yukioru/react-queries/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250506147,"owners_count":21441723,"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","mediaqueries","queries","query","react","tiny"],"created_at":"2024-11-17T04:42:04.461Z","updated_at":"2026-04-02T02:59:59.603Z","avatar_url":"https://github.com/Yukioru.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-queries\nРеакт компонент для управления медиа запросами\n\nЯзык документации: [Русский](https://github.com/Yukioru/react-queries/blob/master/README.md), [English](https://github.com/Yukioru/react-queries/blob/master/README_EN.md)\n\n[![npm bundle size](https://img.shields.io/bundlephobia/minzip/react-queries/latest?style=flat-square)](https://bundlephobia.com/result?p=react-queries@latest)\n![license](https://img.shields.io/npm/l/react-queries?style=flat-square)\n[![npm](https://img.shields.io/npm/v/react-queries?style=flat-square)](https://www.npmjs.com/package/react-queries)\n[![Codacy Badge](https://img.shields.io/codacy/grade/39ab7d3bec48456cab200e3f2507441c?style=flat-square)](https://www.codacy.com/app/akigami/react-queries?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=Yukioru/react-queries\u0026amp;utm_campaign=Badge_Grade)\n\n## Как установить\nЕсли используете npm: `npm install react-queries`\n\nЕсли используете yarn: `yarn add react-queries`\n\n## Как использовать\n\n### Простой\n```javascript\nimport React from 'react';\nimport Query from 'react-queries';\n\nconst Example = () =\u003e (\n  \u003cQuery\n    match={{\n      type: 'screen',\n      minWidth: 600,\n      maxWidth: 1200,\n    }}\n  \u003e\n    Какой-то контент\n  \u003c/Query\u003e\n);\n```\nОтобразится как @media:\n```css\n@media screen and (min-width: 600px) and (max-width: 1200px)\n```\n\n### Расширенный\n```javascript\nimport React from 'react';\nimport Query from 'react-queries';\n\nconst Example = () =\u003e (\n  \u003cQuery\n    match={{\n      minWidth: ['screen', 600],\n      maxWidth: ['print', 1200],\n    }}\n  \u003e\n    Какой-то контент\n  \u003c/Query\u003e\n);\n```\nОтобразится как @media:\n```css\n@media screen and (min-width: 600px), print and (max-width: 1200px)\n```\n\n## Пропсы\n| Поле  | Тип             | Обязательно |\n|-------|-----------------|-------------|\n| match | Shape(Matches)¹ | Да          |\n\n### ¹Matches\n| Поле                  | Тип              | Описание                                    |\n|-----------------------|------------------|---------------------------------------------|\n| type                  | строка           | Один из поддерживаемых типов² (опционально) |\n| [запрос из запросов]³ | строка \\| число \\| [type²: строка, query³: строка \\| число]    | Один из поддерживаемых запросов³. В расширенном использовании - поле является обязательным вместе с типом и запросом, но нельзя использовать поле типа отдельно |\n\n\n## Поддерживаемые match поля\n| Типы²   | Запросы³             |\n|---------|----------------------|\n| all     | aspectRatio          |\n| print   | minAspectRatio       |\n| screen  | maxAspectRatio       |\n| speech  | minColor             |\n|         | maxColor             |\n|         | colorIndex           |\n|         | minColorIndex        |\n|         | maxColorIndex        |\n|         | deviceAspectRatio    |\n|         | minDeviceAspectRatio |\n|         | maxDeviceAspectRatio |\n|         | deviceHeight         |\n|         | minDeviceHeight      |\n|         | maxDeviceHeight      |\n|         | deviceWidth          |\n|         | minDeviceWidth       |\n|         | maxDeviceWidth       |\n|         | height               |\n|         | minHeight            |\n|         | maxHeight            |\n|         | monochrome           |\n|         | minMonochrome        |\n|         | maxMonochrome        |\n|         | orientation          |\n|         | resolution           |\n|         | minResolution        |\n|         | maxResolution        |\n|         | scan                 |\n|         | width                |\n|         | minWidth             |\n|         | maxWidth             |\n\n## Неподдерживаемые match поля\n| Устаревшие типы  |\n|------------------|\n| braille          |\n| embossed         |\n| handheld         |\n| projection       |\n| tty              |\n| tv               |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukioru%2Freact-queries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyukioru%2Freact-queries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukioru%2Freact-queries/lists"}