{"id":19486296,"url":"https://github.com/textbook/component-library","last_synced_at":"2026-06-16T15:31:26.299Z","repository":{"id":79361185,"uuid":"458908478","full_name":"textbook/component-library","owner":"textbook","description":"Example component library with an agile approach","archived":false,"fork":false,"pushed_at":"2022-02-14T11:59:57.000Z","size":3082,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-22T01:47:39.319Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://blog.jonrshar.pe/component-library/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/textbook.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-13T19:23:20.000Z","updated_at":"2022-02-13T21:40:22.000Z","dependencies_parsed_at":"2023-03-12T07:53:41.994Z","dependency_job_id":null,"html_url":"https://github.com/textbook/component-library","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/textbook/component-library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textbook%2Fcomponent-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textbook%2Fcomponent-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textbook%2Fcomponent-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textbook%2Fcomponent-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/textbook","download_url":"https://codeload.github.com/textbook/component-library/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textbook%2Fcomponent-library/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34412785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-10T20:36:25.887Z","updated_at":"2026-06-16T15:31:26.275Z","avatar_url":"https://github.com/textbook.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @codeyourfuture/component-library\n\nExample component library with an agile approach\n\nCheck out component examples at https://blog.jonrshar.pe/component-library.\n\n## Usage\n\n### Installation\n\nThis library is designed to be used in a [React] app (created using e.g. [CRA]).\n\nIt requires [styled-components] 💅 as a peer, so if you're not already using that you'll have to add it as well:\n\n```shell\n$ npm install @codeyourfuture/component-library styled-components\n```\n\n### Use\n\nYou can import the components you need and use them in your own as follows:\n\n```jsx\nimport { Button } from \"@codeyourfuture/component-library\";\n\nexport default function MyComponent() {\n\treturn \u003cButton label=\"Click me!\" onClick={() =\u003e alert(\"Hi there!\")} /\u003e;\n}\n```\n\nThe CYF theme needs to be provided at the top level of your application:\n\n```jsx\nimport { theme } from \"@codeyourfuture/component-library\";\nimport { ThemeProvider } from \"styled-components\";\n\nexport default function App() {\n\treturn \u003cThemeProvider theme={theme}\u003e{/* ... */}\u003c/ThemeProvider\u003e;\n}\n```\n\n## Development\n\n### Requirements\n\n- Supported Node versions are listed in the `\"engines\"` field in `package.json`.\n- Supported React versions are listed in the `\"peerDependencies\"` field in `package.json`.\n- The script to create an application for the E2E tests requires [bash] and [jq].\n\n### Setup\n\n[Clone] the repository (or a [fork] of it) locally and run `npm ci` to install all of the dependencies.\n\n### Scripts\n\n- `e2e`: Run [Cypress] tests to check that the package can be used in a fresh React app\n- `lint`: Run the [ESLint] code style checking\n  - `lint:fix`: Fix any linting violations with fixers\n- `ship`: Run `lint`, then `test`, then `e2e`\n- `storybook`: Run the local [Storybook] dev server\n  - `storybook:build`: Build the static Storybook site\n- `test`: Run the [Jest] unit tests\n\n  - `test:cover`: Run the tests with coverage reporting\n\n  [bash]: https://www.gnu.org/software/bash/\n  [clone]: https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository\n  [cra]: https://create-react-app.dev/\n  [cypress]: https://www.cypress.io/\n  [eslint]: https://eslint.org/\n  [fork]: https://docs.github.com/en/get-started/quickstart/fork-a-repo\n  [jest]: https://jestjs.io/\n  [jq]: https://stedolan.github.io/jq/\n  [react]: https://reactjs.org/\n  [storybook]: https://storybook.js.org/\n  [styled-components]: https://styled-components.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftextbook%2Fcomponent-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftextbook%2Fcomponent-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftextbook%2Fcomponent-library/lists"}