{"id":13393659,"url":"https://github.com/c8r/kit","last_synced_at":"2025-05-15T12:03:42.666Z","repository":{"id":40003248,"uuid":"111834349","full_name":"c8r/kit","owner":"c8r","description":"Tools for developing, documenting, and testing React component libraries","archived":false,"fork":false,"pushed_at":"2022-12-08T17:15:29.000Z","size":36433,"stargazers_count":1209,"open_issues_count":47,"forks_count":30,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-05-08T20:45:30.775Z","etag":null,"topics":["cli","components","design-systems","development","documentation","isolation","jsx","library","mdx","react","styleguide","testing","ui"],"latest_commit_sha":null,"homepage":"https://compositor.io/kit","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/c8r.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":"2017-11-23T17:12:35.000Z","updated_at":"2025-03-07T02:37:46.000Z","dependencies_parsed_at":"2023-01-25T15:00:56.860Z","dependency_job_id":null,"html_url":"https://github.com/c8r/kit","commit_stats":null,"previous_names":[],"tags_count":66,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c8r%2Fkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c8r%2Fkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c8r%2Fkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c8r%2Fkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c8r","download_url":"https://codeload.github.com/c8r/kit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254301619,"owners_count":22047907,"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":["cli","components","design-systems","development","documentation","isolation","jsx","library","mdx","react","styleguide","testing","ui"],"created_at":"2024-07-30T17:00:58.209Z","updated_at":"2025-05-15T12:03:37.645Z","avatar_url":"https://github.com/c8r.png","language":"JavaScript","readme":"\n\u003cimg width='128' height='128' src='https://compositor.io/logo/dist/kit.png' /\u003e\n\n# Compositor Kit\n\nTools for developing, documenting, and testing React component libraries\n\n\u003cimg src='site/demo.gif' /\u003e\n\n- Zero-config development server\n- Component library mode\n- Utility components for demos and development\n- Reuse component examples for development, documentation, and testing\n- Read more about Kit on our [blog][blog]\n\n[blog]: https://compositor.io/blog/introducing-kit/\n\n## Getting Started\n\nInstall the Kit CLI to get started with isolated component development.\n\n```sh\nnpm i -g @compositor/kit-cli\n```\n\nCreate an `examples` folder for your components.\nThis folder can be used for development, documentation, and testing purposes.\n\nAn example file should export a single default component for rendering.\n\n```js\n// Button.js example\nimport React from 'react'\nimport { Button } from '../src'\n\nexport default props =\u003e\n  \u003cButton\u003eButton\u003c/Button\u003e\n```\n\nBe sure to install any local dependencies, including `react`,\nand start the development server.\n\n```sh\nkit examples\n```\n\nThe index will show a list of links to each example.\nEach example will have its own route where it can be viewed in isolation.\n\n### Library Mode\n\nTo view all examples in library mode with persistent navigation, use the `--mode` flag.\n\n```sh\nkit examples --mode library\n```\n\n## Utility Components\n\nIf you already have an existing development setup, or want to enhance your examples, use the [Kit components][core] directly in any React setup.\n\n```sh\nnpm i @compositor/kit\n```\n\n### Library\n\nUse the [`Library`][library], `Example`, and `Detail` components to create a custom component library view.\n\n\u003cimg src='docs/images/library.png' /\u003e\n\n```jsx\nimport React from 'react'\nimport { Library, Example } from '@compositor/kit'\nimport { Button } from '../src'\n\nexport default props =\u003e\n  \u003cLibrary\u003e\n    \u003cExample name='Button'\u003e\n      \u003cButton\u003eButton\u003c/Button\u003e\n    \u003c/Example\u003e\n  \u003c/Library\u003e\n```\n\n### XRay\n\nUse the [`XRay`][xray] component to outline HTML elements and display a grid to help ensure your UI is visually aligned.\n\n\u003cimg src='docs/images/x-ray.png' /\u003e\n\n```jsx\nimport React from 'react'\nimport { XRay } from '@compositor/kit'\nimport { Button } from '../src'\n\nexport default props =\u003e\n  \u003cXRay\u003e\n    \u003cButton\u003eButton\u003c/Button\u003e\n  \u003c/XRay\u003e\n```\n\n### Cartesian\n\nUse the [`Cartesian`][cartesian] component to render the cartesian product of props.\n\n\u003cimg src='docs/images/cartesian.png' /\u003e\n\n```jsx\nimport React from 'react'\nimport { Cartesian } from '@compositor/kit'\nimport Button from '../src/Button'\n\nexport default props =\u003e (\n  \u003cCartesian\n    component={Button}\n    m={4}\n    fontSize={[1, 2, 3]}\n    bg={['blue', 'pink', 'tomato', 'purple']}\n    children={['Hello, world!', 'Beep']}\n  /\u003e\n)\n```\n\n### Responsive\n\nUse the [`Responsive`][responsive] component to render components in multiple iframes at different viewport sizes.\n\n\u003cimg src='docs/images/responsive.png' /\u003e\n\n```jsx\nimport React from 'react'\nimport { Responsive } from '@compositor/kit'\nimport PageHeader from '../src/PageHeader'\n\nconst example = (\n  \u003cResponsive\u003e\n    \u003cPageHeader /\u003e\n  \u003c/Responsive\u003e\n)\n```\n\n### Other Components\n\nSee the [Kit components][core] package for more components.\n\n## Kit Init\n\nUse the `kit init` command to create a new project based on a growing set of [templates](templates).\n\n## Utilities\n\n- [*kit-snapshot*](snapshot): run Jest snapshot tests for example components\n\n---\n\n## Related\n\n- [@compositor/x0][x0]\n- [@mdx-js/mdx][mdx]\n- [react-live][react-live]\n- [styled-system][styled-system]\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n---\n\n[Made by Compositor](https://compositor.io/)\n|\n[MIT License](license)\n\n[x0]: https://github.com/c8r/x0\n[mdx]: https://github.com/mdx-js/mdx\n[react-live]: https://github.com/FormidableLabs/react-live\n[styled-system]: https://github.com/jxnblk/styled-system\n\n[core]: core\n[xray]: docs/XRay.md\n[cartesian]: docs/Cartesian.md\n[library]: docs/Library.md\n[responsive]: docs/Responsive.md\n","funding_links":[],"categories":["JavaScript","Design System Tools"],"sub_categories":["Components"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc8r%2Fkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc8r%2Fkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc8r%2Fkit/lists"}