{"id":18783917,"url":"https://github.com/sparkpost/libby-react","last_synced_at":"2026-05-01T00:31:49.928Z","repository":{"id":37657354,"uuid":"335047576","full_name":"SparkPost/libby-react","owner":"SparkPost","description":"A React component development \u0026 testing environment","archived":false,"fork":false,"pushed_at":"2024-04-12T14:11:29.000Z","size":6222,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-02-14T22:08:07.479Z","etag":null,"topics":["component-library","design-systems","react","team-ux"],"latest_commit_sha":null,"homepage":"","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/SparkPost.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":"2021-02-01T18:36:52.000Z","updated_at":"2021-12-17T13:56:55.000Z","dependencies_parsed_at":"2024-04-12T15:41:59.846Z","dependency_job_id":null,"html_url":"https://github.com/SparkPost/libby-react","commit_stats":{"total_commits":128,"total_committers":3,"mean_commits":"42.666666666666664","dds":0.140625,"last_synced_commit":"b06018db2abf6cc9824f66f556c336de497bb23c"},"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Flibby-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Flibby-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Flibby-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Flibby-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SparkPost","download_url":"https://codeload.github.com/SparkPost/libby-react/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239699579,"owners_count":19682574,"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-library","design-systems","react","team-ux"],"created_at":"2024-11-07T20:41:10.211Z","updated_at":"2025-12-20T20:30:15.828Z","avatar_url":"https://github.com/SparkPost.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Libby\n\nLibby is a focused, no-frills React component development tool, similar to Storybook but without the plugins or addons. Libby provides a standalone environment that can be used or deployed with your component or design system documentation.\n\n##### Demos\n\n- [matchbox-libby.netlify.app/](https://matchbox-libby.netlify.app/)\n- [libby.netlify.app/](https://libby.netlify.app/)\n\n### Motivation\n\nStorybook is slow and ships with a lot of features that we don't need. We wanted something performant, lightweight, with slim dependencies. Benchmarking shown here was done with 1,000 stories with a single `\u003cdiv/\u003e`, on a 2019 MBP i7 2.6GHz. Both setups are using default configs.\n\nLibby is over **20x** faster than Storybook at starting up, and is **4x** faster at a production build.\n\nFinal bundled size is **492 KB** for Libby, compared to **5.6 MB** for Storybook.\n\n\u003cimg width=\"659\" alt=\"Screen Shot 2022-03-23 at 8 15 29 PM\" src=\"https://user-images.githubusercontent.com/3903325/159817365-be0b0d96-cb6f-473f-abac-17d7102aa712.png\"\u003e\n\n---\n\n### Getting Started\n\nInstall `libby` in your app:\n\n```bash\nnpm i libby-react\n```\n\nCreate a `libby.config.js` file to the root directory of your project:\n\n```js\n/**\n * @type {import('@sparkpost/libby-react').Config}\n */\nexport default {\n    /**\n   * Reference to your entries, imported with a `require.context` function\n   * @see https://webpack.js.org/api/module-methods/#requirecontext\n   */\n  entries: () =\u003e require.context('./src', true, /\\.libby\\.jsx$/),\n  /**\n   * Page title\n   * @default 'Libby'\n   */\n  title: 'Libby',\n\n  /**\n   * Specifies the port for the dev server\n   * @default 9000\n   */\n  port: 9000,\n\n  /**\n   * Output path for the build\n   * @default 'dist/libby'\n   */\n  outputPath: 'dist/libby',\n\n  /**\n   * Opens the browser when running the dev server\n   */\n  openBrowser: true,\n\n  /**\n   * Path to any JS you want to run before entries are mounted\n   * A function must be the default export\n   */\n  preview: 'path/to/preview.jsx',\n\n  /**\n   * Path to a custom wrapper for all entries\n   * A react component must be the default export\n   */\n  layout: 'path/to/layout.jsx',\n\n  /**\n   * Array of background colors for your stories\n   */\n  backgrounds: ['#ffffff', '#FFCCD5', '#ebf0f5'],\n\n  /**\n   * Custom webpack config\n   */\n  webpack?: ({ mode }) =\u003e ({\n\n  }),\n};\n```\n\nAdd the following scripts to your `package.json` file:\n\n```js\n// package.json\n\"scripts\": {\n  \"start\": \"libby start\",\n  \"build\": \"libby build\"\n}\n```\n\nRun libby:\n\n```bash\nnpm run start\n```\n\nCreate an entry:\n\n```js\nimport React from 'react';\nimport { describe, add, it } from '@sparkpost/libby-react';\n\ndescribe('My Component', () =\u003e {\n  add('Renders', () =\u003e \u003cdiv\u003eThis is a React component!\u003c/div\u003e);\n});\n```\n\n---\n\n### License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparkpost%2Flibby-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsparkpost%2Flibby-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparkpost%2Flibby-react/lists"}