{"id":27442910,"url":"https://github.com/shebannavar/responsive-detect","last_synced_at":"2026-05-05T14:33:14.100Z","repository":{"id":287847443,"uuid":"965981322","full_name":"shebannavar/responsive-detect","owner":"shebannavar","description":"A tiny utility to detect responsive breakpoints in any modern JavaScript framework (React, Vue, Svelte, etc.).","archived":false,"fork":false,"pushed_at":"2025-04-14T13:23:21.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-06T17:33:54.325Z","etag":null,"topics":["breakpoints","hooks","react","svelte","utility","vue"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/responsive-detect","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shebannavar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-14T08:07:32.000Z","updated_at":"2025-04-14T13:23:25.000Z","dependencies_parsed_at":"2025-04-15T01:17:22.219Z","dependency_job_id":null,"html_url":"https://github.com/shebannavar/responsive-detect","commit_stats":null,"previous_names":["shebannavar/responsive-detect"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shebannavar/responsive-detect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shebannavar%2Fresponsive-detect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shebannavar%2Fresponsive-detect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shebannavar%2Fresponsive-detect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shebannavar%2Fresponsive-detect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shebannavar","download_url":"https://codeload.github.com/shebannavar/responsive-detect/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shebannavar%2Fresponsive-detect/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32653553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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","hooks","react","svelte","utility","vue"],"created_at":"2025-04-15T01:17:20.447Z","updated_at":"2026-05-05T14:33:14.078Z","avatar_url":"https://github.com/shebannavar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# responsive-detect\n\n📱 A tiny utility to detect responsive breakpoints in any modern JavaScript framework (React, Vue, Svelte, etc.).\n\n---\n\n## Table of Contents\n\n- [📦 Installation](#-installation)\n- [🛠️ Usage](#️-usage)\n  - [React](#react)\n  - [Vue 3 (Composition API)](#vue-3-composition-api)\n  - [Svelte](#svelte)\n- [🔧 Examples](#examples)\n- [⚙️ API](#️-api)\n- [📄 License](#-license)\n\n---\n\n## 📦 Installation\n\n```bash\nnpm install responsive-detect\n```\n\nor\n\n```bash\nyarn add responsive-detect\n```\n\n---\n\n## 🛠️ Usage\n\n### React\n\n```tsx\nimport { useBreakpoint } from 'responsive-detect'\n\nconst breakpoints = {\n  mobile: 0,\n  tablet: 768,\n  desktop: 1024\n}\n\nexport default function App() {\n  const current = useBreakpoint(breakpoints)\n\n  return (\n    \u003cdiv\u003e\n      \u003ch1\u003eCurrent: {current}\u003c/h1\u003e\n    \u003c/div\u003e\n  )\n}\n```\n\n---\n\n### Vue 3 (Composition API)\n\n```ts\n\u003cscript setup lang=\"ts\"\u003e\nimport { useBreakpoint } from 'responsive-detect'\n\nconst breakpoints = {\n  mobile: 0,\n  tablet: 768,\n  desktop: 1024\n}\n\nconst current = useBreakpoint(breakpoints)\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cdiv\u003eCurrent: {{ current }}\u003c/div\u003e\n\u003c/template\u003e\n```\n\n---\n\n### Svelte\n\n```svelte\n\u003cscript lang=\"ts\"\u003e\n  import { useBreakpoint } from 'responsive-detect'\n\n  const breakpoints = {\n    mobile: 0,\n    tablet: 768,\n    desktop: 1024\n  }\n\n  const current = useBreakpoint(breakpoints)\n\u003c/script\u003e\n\n\u003ch1\u003eCurrent: {$current}\u003c/h1\u003e\n```\n\n---\n\n## 🔧 Examples\n\nHere are example projects demonstrating the usage of `responsive-detect` in different frameworks:\n\n- **[React Example](https://github.com/shebannavar/responsive-detect/blob/master/examples/react-example.jsx)**\n- **[Vue 3 Example](https://github.com/shebannavar/responsive-detect/blob/master/examples/vue3-example.vue)**\n- **[Svelte Example](https://github.com/shebannavar/responsive-detect/blob/master/examples/svelte-example.svelte)**\n\nYou can clone the examples or add the `responsive-detect` package to your existing project to test responsiveness.\n\n---\n\n## ⚙️ API\n\n### `useBreakpoint(breakpoints)`\n\nA lightweight utility hook that returns the current active breakpoint.\n\n#### Parameters\n\n| Name        | Type                      | Description                                 |\n|-------------|---------------------------|---------------------------------------------|\n| breakpoints | `Record\u003cstring, number\u003e`  | Object with named breakpoints in pixels     |\n\n#### Returns\n\nA reactive value with the current breakpoint label (e.g., \"mobile\", \"tablet\", \"desktop\").\n\n---\n\n## 📄 License\n\nMIT © 2025 Santosh Shebannavar","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshebannavar%2Fresponsive-detect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshebannavar%2Fresponsive-detect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshebannavar%2Fresponsive-detect/lists"}