功能支持框架
Storybook 与许多流行的前端框架集成。我们尽最大努力保持框架之间的功能一致性,但对于我们这个规模不大的团队来说,支持每个框架是很困难的。
¥Storybook integrates with many popular frontend frameworks. We do our best to keep feature parity amongst frameworks, but it’s tricky for our modest team to support every framework.
以下是支持哪些框架集成的综合表格。如果你希望框架支持某项功能,我们欢迎你提出拉取请求。
¥Below is a comprehensive table of what’s supported in which framework integration. If you’d like a certain feature supported in your framework, we welcome pull requests.
核心框架
¥Core frameworks
核心框架有专门的维护者或贡献者负责维护集成。因此,你可以在这些框架中使用大多数 Storybook 功能。
¥Core frameworks have dedicated maintainers or contributors who are responsible for maintaining the integration. As such, you can use most Storybook features in these frameworks.
React | Vue 3 | Angular | Web 组件 | |
---|---|---|---|---|
基本要素 | ||||
操作 | ✅ | ✅ | ✅ | ✅ |
背景 | ✅ | ✅ | ✅ | ✅ |
文档 | ✅ | ✅ | ✅ | ✅ |
视口 | ✅ | ✅ | ✅ | ✅ |
控件 | ✅ | ✅ | ✅ | ✅ |
测量 | ✅ | ✅ | ✅ | ✅ |
大纲 | ✅ | ✅ | ✅ | ✅ |
插件 | ||||
A11y | ✅ | ✅ | ✅ | ✅ |
组件测试 | ✅ | ✅ | ✅ | ✅ |
测试运行器 | ✅ | ✅ | ✅ | ✅ |
测试覆盖率 | ✅ | ✅ | ✅ | ✅ |
CSS 资源 | ✅ | ✅ | ✅ | ✅ |
设计资源 | ✅ | ✅ | ✅ | ✅ |
事件 | ✅ | ✅ | ✅ | ✅ |
Google 分析 | ✅ | ✅ | ✅ | ✅ |
GraphQL | ✅ | ✅ | ||
Jest | ✅ | ✅ | ✅ | ✅ |
链接 | ✅ | ✅ | ✅ | ✅ |
Queryparams | ✅ | ✅ | ✅ | ✅ |
Storysource | ✅ | ✅ | ✅ | ✅ |
文档 | ||||
CSF Stories | ✅ | ✅ | ✅ | ✅ |
自动文档 | ✅ | ✅ | ✅ | ✅ |
文档块 - ArgTypes | ✅ | ✅ | ✅ | ✅ |
文档块 - 画布 | ✅ | ✅ | ✅ | ✅ |
文档块 - ColorPalette | ✅ | ✅ | ✅ | ✅ |
文档块 - 控件 | ✅ | ✅ | ✅ | ✅ |
文档块 - 描述 | ✅ | ✅ | ✅ | ✅ |
文档块 - IconGallery | ✅ | ✅ | ✅ | ✅ |
文档块 - Markdown | ✅ | ✅ | ✅ | ✅ |
文档块 - 元 | ✅ | ✅ | ✅ | ✅ |
文档块 - 主要 | ✅ | ✅ | ✅ | ✅ |
文档块 - 来源 | ✅ | ✅ | ✅ | ✅ |
文档块 - 故事 | ✅ | ✅ | ✅ | ✅ |
文档块 - 故事 | ✅ | ✅ | ✅ | ✅ |
文档块 - 副标题 | ✅ | ✅ | ✅ | ✅ |
文档块 - 标题 | ✅ | ✅ | ✅ | ✅ |
文档块 - 排版 | ✅ | ✅ | ✅ | ✅ |
文档块 - 未样式化 | ✅ | ✅ | ✅ | ✅ |
文档块 - UseOf | ✅ | ✅ | ✅ | ✅ |
内联故事 | ✅ | ✅ | ✅ | ✅ |
社区框架
¥Community frameworks
社区框架的贡献者较少,这意味着它们可能不如核心框架那么新。如果你在工作中使用其中一个框架,请考虑为其与 Storybook 的集成做出贡献。
¥Community frameworks have fewer contributors which means they may not be as up to date as core frameworks. If you use one of these frameworks for your job, please consider contributing to its integration with Storybook.
Ember | HTML | Svelte | Preact | Qwik | SolidJS | |
---|---|---|---|---|---|---|
基本要素 | ||||||
操作 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
背景 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
文档 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
视口 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
控件 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
测量 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
大纲 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
插件 | ||||||
A11y | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
组件测试 | ✅ | ✅ | ✅ | ✅ | ✅ | |
测试运行器 | ✅ | ✅ | ✅ | ✅ | ✅ | |
测试覆盖率 | ✅ | ✅ | ✅ | ✅ | ✅ | |
CSS 资源 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
设计资源 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
事件 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Google 分析 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
GraphQL | ||||||
Jest | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
链接 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Queryparams | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Storysource | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
文档 | ||||||
CSF Stories | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
自动文档 | ✅ | ✅ | ✅ | ✅ | ✅ | |
文档块 - ArgTypes | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
文档块 - 画布 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
文档块 - ColorPalette | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
文档块 - 控件 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
文档块 - 描述 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
文档块 - IconGallery | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
文档块 - Markdown | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
文档块 - 元 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
文档块 - 主要 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
文档块 - 来源 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
文档块 - 故事 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
文档块 - 故事 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
文档块 - 副标题 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
文档块 - 标题 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
文档块 - 排版 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
文档块 - 未样式化 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
文档块 - UseOf | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
内联故事 | ✅ | ✅ |
已弃用
¥Deprecated
为了使 Storybook 生态系统与当前的前端开发状态保持一致,以下功能和插件现已弃用,不再维护,并将在 Storybook 的未来版本中删除
¥To align the Storybook ecosystem with the current state of frontend development, the following features and addons are now deprecated, no longer maintained, and will be removed in future versions of Storybook
功能 | 状态 |
---|---|
旋钮 | Knobs 插件在 Storybook 6.3 发布后正式弃用,不再积极维护。我们建议改用 controls。 |
Storyshots | Storyshots 插件在 Storybook 7.6 发布后正式弃用,不再积极维护,并在 Storybook 8 中被删除。有关可用替代方案,请参阅 迁移指南。 |
StoriesOf | storiesOf API 已在 Storybook 8 发布后正式删除,不再维护。我们建议改用 CSF API 来编写故事。有关更多信息,请参阅 迁移指南。 |