{"id":48793048,"url":"https://github.com/dash-ui/mq","last_synced_at":"2026-04-13T21:11:07.739Z","repository":{"id":40704867,"uuid":"234452434","full_name":"dash-ui/mq","owner":"dash-ui","description":"A utility function for adding reusable media queries and breakpoints to @dash-ui styles","archived":false,"fork":false,"pushed_at":"2023-10-17T09:31:00.000Z","size":1310,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T03:08:27.206Z","etag":null,"topics":["breakpoints","dash","dash-ui","media-queries"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/dash-ui.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-17T02:17:17.000Z","updated_at":"2021-10-03T18:56:56.000Z","dependencies_parsed_at":"2022-07-29T02:48:17.999Z","dependency_job_id":null,"html_url":"https://github.com/dash-ui/mq","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/dash-ui/mq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dash-ui%2Fmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dash-ui%2Fmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dash-ui%2Fmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dash-ui%2Fmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dash-ui","download_url":"https://codeload.github.com/dash-ui/mq/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dash-ui%2Fmq/sbom","scorecard":{"id":323644,"data":{"date":"2025-08-11","repo":{"name":"github.com/dash-ui/mq","commit":"25ae1a106b7d9a03076a563a8dd6d02292115c77"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/dash-ui/mq/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/dash-ui/mq/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/dash-ui/mq/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/dash-ui/mq/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/dash-ui/mq/release.yml/main?enable=pin","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'","Warn: branch protection not enabled for branch 'alpha'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 20 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"21 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-rxrc-rgv4-jpvx","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-f9xv-q969-pqx4"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T01:57:53.621Z","repository_id":40704867,"created_at":"2025-08-18T01:57:53.621Z","updated_at":"2025-08-18T01:57:53.621Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31770936,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["breakpoints","dash","dash-ui","media-queries"],"created_at":"2026-04-13T21:11:04.654Z","updated_at":"2026-04-13T21:11:07.717Z","avatar_url":"https://github.com/dash-ui.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003chr/\u003e\n\n\u003cimg src='https://github.com/dash-ui/styles/raw/main/assets/logo.png'/\u003e\n\n\u003e A utility function for adding reusable media queries and breakpoints to @dash-ui styles\n\n```sh\nnpm i @dash-ui/mq\n```\n\n\u003cp\u003e\n  \u003ca href=\"https://bundlephobia.com/result?p=@dash-ui/mq\"\u003e\n    \u003cimg alt=\"Bundlephobia\" src=\"https://img.shields.io/bundlephobia/minzip/@dash-ui/mq?style=for-the-badge\u0026labelColor=24292e\"\u003e\n  \u003c/a\u003e\n  \u003ca aria-label=\"Types\" href=\"https://www.npmjs.com/package/@dash-ui/mq\"\u003e\n    \u003cimg alt=\"Types\" src=\"https://img.shields.io/npm/types/@dash-ui/mq?style=for-the-badge\u0026labelColor=24292e\"\u003e\n  \u003c/a\u003e\n  \u003ca aria-label=\"Code coverage report\" href=\"https://codecov.io/gh/dash-ui/mq\"\u003e\n    \u003cimg alt=\"Code coverage\" src=\"https://img.shields.io/codecov/c/gh/dash-ui/mq?style=for-the-badge\u0026labelColor=24292e\"\u003e\n  \u003c/a\u003e\n  \u003ca aria-label=\"Build status\" href=\"https://github.com/dash-ui/mq/actions/workflows/release.yml\"\u003e\n    \u003cimg alt=\"Build status\" src=\"https://img.shields.io/github/workflow/status/dash-ui/mq/release/main?style=for-the-badge\u0026labelColor=24292e\"\u003e\n  \u003c/a\u003e\n  \u003ca aria-label=\"NPM version\" href=\"https://www.npmjs.com/package/@dash-ui/mq\"\u003e\n    \u003cimg alt=\"NPM Version\" src=\"https://img.shields.io/npm/v/@dash-ui/mq?style=for-the-badge\u0026labelColor=24292e\"\u003e\n  \u003c/a\u003e\n  \u003ca aria-label=\"License\" href=\"https://jaredlunde.mit-license.org/\"\u003e\n    \u003cimg alt=\"MIT License\" src=\"https://img.shields.io/npm/l/@dash-ui/mq?style=for-the-badge\u0026labelColor=24292e\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Quick start\n\n[Check out an example on **CodeSandbox**](https://codesandbox.io/s/dash-uimq-example-sdol5?file=/src/App.tsx)\n\n```js\nimport mq from \"@dash-ui/mq\";\nimport { styles } from \"@dash-ui/styles\";\n\nconst breakpoint = mq(styles, {\n  // 0px\n  sm: \"only screen and (min-width: 0em)\",\n  // 560px\n  mq: \"only screen and (min-width: 35em)\",\n  // 1280px\n  lg: \"only screen and (min-width: 80em)\",\n});\n\nconst box = styles.one(\n  breakpoint({\n    sm: ({ color }) =\u003e ({\n      width: 100,\n      height: 100,\n      backgroundColor: color.primary,\n    }),\n    md: ({ color }) =\u003e ({\n      width: 200,\n      height: 200,\n      backgroundColor: color.primary,\n    }),\n    lg: ({ color }) =\u003e ({\n      width: 400,\n      height: 400,\n      backgroundColor: color.primary,\n    }),\n  })\n);\n\nexport const Component = () =\u003e \u003cdiv className={box()} /\u003e;\n```\n\n## API\n\n### mq()\n\nA factory function that creates a utility for adding breakpoints and\nmedia queries to Dash styles.\n\n#### Example\n\n[Check out an example on **CodeSandbox**](https://codesandbox.io/s/dash-uimq-example-sdol5?file=/src/App.tsx)\n\n```tsx\nimport mq from \"@dash-ui/mq\";\nimport { styles } from \"@dash-ui/styles\";\n\n// Creates the stored media queries\nconst breakpoint = mq(styles, {\n  sm: \"only screen and (min-width: 0em)\",\n  mq: \"only screen and (min-width: 35em)\",\n  lg: \"only screen and (min-width: 80em)\",\n});\n\n// Can be used as a shortcut for `@media ...`\nconst boxOne = styles.one`\n  width: 200px;\n  height: 200px;\n\n  /**\n   * This box will be 400x400 when \"md\" breakpoint matches\n   */\n  ${breakpoint(\"md\")} {\n    width: 400px;\n    height: 400px;\n  }\n`;\n\n// Can be used like a style mapping\nconst boxTwo = styles.one(\n  breakpoint({\n    // This box will always have a `primary` color background\n    default: ({ color }) =\u003e ({\n      backgroundColor: color.primary,\n    }),\n    // This box will be 100x100 when `sm` media query is matched\n    sm: {\n      width: 100,\n      height: 100,\n    },\n    // This box will be 200x200 when `md` media query is matched\n    md: `\n      width: 200px;\n      height: 200px;\n    `,\n    // This box will be 400x400 when `lg` media query is matched\n    lg: `\n      width: 400px;\n      height: 400px\n    `,\n  })\n);\n\nconst Component = () =\u003e (\n  \u003cReact.Fragment\u003e\n    \u003cdiv className={boxOne()} /\u003e\n    \u003cdiv className={boxTwo()} /\u003e\n  \u003c/React.Fragment\u003e\n);\n```\n\n#### Arguments\n\n```typescript\nfunction mq\u003c\n  Tokens extends DashTokens = DashTokens,\n  Themes extends DashThemes = DashThemes,\n  QueryNames extends string = string\n\u003e(\n  styles: Styles\u003cTokens, Themes\u003e,\n  mediaQueries: MediaQueries\u003cQueryNames\u003e\n): {\n  (queryName: QueryNames): string;\n  (queryName: MediaQueryObject\u003cQueryNames, Tokens, Themes\u003e): string;\n};\n```\n\n| Argument     | Type                                   | Required? | Description                           |\n| ------------ | -------------------------------------- | --------- | ------------------------------------- |\n| styles       | `styles`                               | Yes       | A Dash `styles` instance              |\n| mediaQueries | `{readonly [K in QueryNames]: string}` | Yes       | A map of media query name/query pairs |\n\n#### Returns\n\n```typescript\n// When a `string` is provided as the `mediaQueries` argument, this\n// will return a `MediaQueryNameCallback`, otherwise a `MediaQueryCssCallback`\nfunction mqStyles(queryName: QueryNames): string;\nfunction mqStyles(\n  queryName: MediaQueryObject\u003cQueryNames, Tokens, Themes\u003e\n): string;\n```\n\n## LICENSE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdash-ui%2Fmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdash-ui%2Fmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdash-ui%2Fmq/lists"}