{"id":13821977,"url":"https://github.com/raunofreiberg/inspx","last_synced_at":"2025-05-15T09:02:24.401Z","repository":{"id":40996678,"uuid":"360906218","full_name":"raunofreiberg/inspx","owner":"raunofreiberg","description":"Pixel perfect layout inspection.","archived":false,"fork":false,"pushed_at":"2023-02-01T15:26:58.000Z","size":1157,"stargazers_count":1439,"open_issues_count":7,"forks_count":30,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-07T03:15:41.095Z","etag":null,"topics":["component","dx","element","inspect","layout","react"],"latest_commit_sha":null,"homepage":"https://inspx.rauno.xyz","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/raunofreiberg.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":"2021-04-23T14:11:28.000Z","updated_at":"2025-04-05T09:46:51.000Z","dependencies_parsed_at":"2023-02-17T07:15:28.702Z","dependency_job_id":null,"html_url":"https://github.com/raunofreiberg/inspx","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/raunofreiberg%2Finspx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raunofreiberg%2Finspx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raunofreiberg%2Finspx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raunofreiberg%2Finspx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raunofreiberg","download_url":"https://codeload.github.com/raunofreiberg/inspx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248890465,"owners_count":21178434,"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":["component","dx","element","inspect","layout","react"],"created_at":"2024-08-04T08:01:36.575Z","updated_at":"2025-04-14T13:45:21.858Z","avatar_url":"https://github.com/raunofreiberg.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","📦 Legacy \u0026 Inactive Projects"],"sub_categories":[],"readme":"![image](/www/public/og.png)\n\n## inspx\n\n![npm](https://img.shields.io/npm/v/inspx?style=flat\u0026colorA=000000\u0026colorB=000000)\n\nPixel perfect layout inspection.\n\n\u003e Built for React as a proof of concept.\n\n## Setup\n\nInstall the package:\n\n```sh\nnpm install inspx --save-dev\n```\n\nWrap the root of your application or arbitrary component trees:\n\n```tsx\nimport Inspect from 'inspx';\n\n\u003cInspect\u003e\n  \u003cApp /\u003e\n\u003c/Inspect\u003e\n```\n\n## Usage\n\nInspect elements by hovering an element and holding \u003ckbd\u003eOption (⌥)\u003c/kbd\u003e simultaneously.\n\n![demo](/public/demo.gif)\n\nBy default, any element with padding, margin, or width and height is inspectable.\n\nYou can disable certain properties:\n\n```tsx\n\u003cInspect \n  margin \n  size={false} \n  padding={false}\n\u003e\n  \u003cApp /\u003e\n\u003c/Inspect\u003e\n```\n\n## Configuration\n\nBy default, the component will only be enabled in the development environment.\n\nYou can configure this behavior with the `disabled` prop:\n\n```tsx\n\u003cInspect\n  disabled={\n    process.env.NODE_ENV === 'staging' || \n    process.env.NODE_ENV === 'production'\n  }\n\u003e\n  \u003cApp /\u003e\n\u003c/Inspect\u003e\n```\n\nOptionally, you can leverage code splitting by wrapping the exported component and using your own instead.\n\n\u003e The library is lightweight enough for this to likely be a premature and insignificant optimization.\n\n```tsx\nimport * as React from 'react';\nimport { InspectProps } from 'inspx';\n\nconst Inspect = React.lazy(() =\u003e import('inspx'));\n\nexport default function Loader(props: InspectProps) {\n  if (process.env.NODE_ENV === 'production') {\n    return props.children;\n  }\n  return (\n    \u003cReact.Suspense fallback={null}\u003e\n      \u003cInspect disabled={false} {...props} /\u003e\n    \u003c/React.Suspense\u003e\n  );\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraunofreiberg%2Finspx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraunofreiberg%2Finspx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraunofreiberg%2Finspx/lists"}