@contentful/f36-workbench

中文文档
4.21.1发布于 2024/01/31MITTypeScriptESM + CJS近 30 天下载 5316

Forma 36: Workbench component

原始使用文档
文档目录11 节
  1. title: 'Workbench' slug: /components/workbench/ github: 'ht…
  2. Import
  3. Props (API reference)
  4. Workbench
  5. Workbench.Header
  6. Workbench.Content
  7. Workbench.Sidebar
  8. Content guidelines
  9. Header
  10. Main content
  11. Sidebars

title: 'Workbench' slug: /components/workbench/ github: 'https://github.com/contentful/forma-36/tree/main/packages/components/workbench' storybook: 'https://f36-storybook.contentful.com/?path=/docs/components-workbench--basic' typescript: ./src/Workbench.tsx,./src/WorkbenchHeader/WorkbenchHeader.tsx,./src/WorkbenchContent/WorkbenchContent.tsx,./src/WorkbenchSidebar/WorkbenchSidebar.tsx

An app shell that structures regions of content and interaction. The workbench assembles the outer app shell which defines regions to structure content and interactions.
This component is not included in @contentful/f36-components which means that to use, you will need to import it from @contentful/f36-workbench directly.

Import

import { Workbench } from '@contentful/f36-workbench';

Props (API reference)

Workbench

Workbench.Header

Workbench.Content

Workbench.Sidebar

Content guidelines

Header

The Header provides navigational guidance and primary actions on the current view.

  • The Header should only provide actions which are global to the current view (e.g. Button to create a user on a users list view)
  • When multiple global actions are needed a dropdown menu should be used
  • Buttons that submit a form on the current view should not be placed in the title bar but be part of that specific form.

Main content

The main content area provides the main functionality of the current view.

Depending on the displayed information one of the 3 width configurations should be applied:

  • Views that just consist of forms or text should have a maximum width of 768px for enhanced readability.
  • Static table views which contents are not configurable should default to a maximum width of 1280px.
  • Rich data views like dashboards or configurable tables should use the entire available width.

Sidebars

The left sidebar provides quick access to saved views and filters. The right sidebar provides secondary interactions depending on the current view as well as documentation spaces and entry points for extensibility.

  • The left sidebar serves as secondary navigation and provides predefined and user-defined filters
  • It should not include any view actions like adding or removing content

版本与发布记录

@contentful/f36-workbench 共发布 193 个版本,首次发布于 2021/09/07;过去 12 个月发布了 0 个版本。

版本发布日期距今
4.21.1latest2024/01/312 年前
4.22.0-beta.5beta2023/07/073 年前
4.22.0-beta.42023/05/093 年前
4.22.0-beta.32023/04/263 年前
4.22.0-beta.22023/04/213 年前
4.22.0-beta.12023/04/213 年前

关于 @contentful/f36-workbench 的常见问题

@contentful/f36-workbench 是什么?

Forma 36: Workbench component

如何安装 @contentful/f36-workbench?

在项目目录运行 npm install @contentful/f36-workbench,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(>=16.8)、react-dom(>=16.8)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@contentful/f36-workbench 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@contentful/f36-workbench 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@contentful/f36-workbench 可以商用吗?

@contentful/f36-workbench 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@contentful/f36-workbench 的下载量有多少?

根据 npm 官方下载统计,@contentful/f36-workbench 在 2026/10/11 – 2026/11/09 这 30 天内被下载 5,316 次,日均约 177 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@contentful/f36-workbench 还在维护吗?

最新版本 4.21.1 发布于 2024/01/31(2 年前);至今共发布 193 个版本,其中过去 12 个月发布了 0 个;首次发布于 2021/09/07。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。