{"id":16092409,"url":"https://github.com/bukinoshita/space","last_synced_at":"2025-03-17T17:31:04.522Z","repository":{"id":37105366,"uuid":"246170523","full_name":"bukinoshita/space","owner":"bukinoshita","description":"A spacing util","archived":false,"fork":false,"pushed_at":"2023-01-05T09:41:46.000Z","size":530,"stargazers_count":5,"open_issues_count":13,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T02:11:51.539Z","etag":null,"topics":["design","space","spacing","system","theme","ui"],"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/bukinoshita.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":"2020-03-10T00:21:51.000Z","updated_at":"2022-07-06T01:31:28.000Z","dependencies_parsed_at":"2023-02-03T23:30:55.528Z","dependency_job_id":null,"html_url":"https://github.com/bukinoshita/space","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bukinoshita%2Fspace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bukinoshita%2Fspace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bukinoshita%2Fspace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bukinoshita%2Fspace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bukinoshita","download_url":"https://codeload.github.com/bukinoshita/space/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243871911,"owners_count":20361380,"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":["design","space","spacing","system","theme","ui"],"created_at":"2024-10-09T16:08:01.527Z","updated_at":"2025-03-17T17:31:04.114Z","avatar_url":"https://github.com/bukinoshita.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Space\n\n\u003e A spacing util\n\n## Install\n\n```bash\n$ yarn add @bukinoshita/space\n```\n\n## Usage\n\nExample with [styled-jsx](https://github.com/zeit/styled-jsx).\n\n```ts\n// theme/space.ts\nimport { Space } from '@bukinoshita/space'\n\n// It uses the `4px` grid by default\nexport const space = new Space()\n```\n\n```tsx\n// components/my-component.tsx\nimport { space } from 'theme/spacing'\n\nconst MyComponent = () =\u003e (\n  \u003cdiv\u003e\n    \u003ch1\u003eNice\u003c/h1\u003e\n\n    \u003cstyle jsx={true}\u003e\n    {`\n      h1 {\n        margin-bottom: ${space.spacing(2)} // 8px;\n        color: black;\n      }\n    `}\n    \u003c/style\u003e\n  \u003c/div\u003e\n)\n```\n\nYou can find more [example here](/examples).\n\n## API\n\n### Space(grid, unit)\n\n#### grid\n\nType: `number`\u003cbr /\u003e\nDefault: `4`\u003cbr /\u003e\nOptional\n\n#### unit\n\nType: `string`\u003cbr /\u003e\nDefault: `px`\u003cbr /\u003e\nOptional\n\n### .spacing(value)\n\n#### value\n\nType: `number`\u003cbr /\u003e\nRequired\n\n## License\n\nMIT © [Bu Kinoshita](https://bukinoshita.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbukinoshita%2Fspace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbukinoshita%2Fspace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbukinoshita%2Fspace/lists"}