@gemeente-denhaag/descriptionlist

中文文档
4.1.2发布于 2026/09/23EUPL-1.2TypeScriptESM + CJS构建来源已验证近 30 天下载 3428

A description list component

原始使用文档
文档目录15 节
  1. When to use
  2. Alternatives and related components
  3. Anatomy
  4. (Interactive) states
  5. Design properties
  6. Typography
  7. Color
  8. Structure
  9. Accessibility
  10. Content guidelines
  11. Custom header widths
  12. Best practices
  13. Do’s
  14. Don’ts
  15. References

Data list

Data lists organize and display information into rows.

When to use

Use a data list for displaying data that is intended to be easily scanned and compared.

  • Use lists to create an actionable list of related items that link to detail pages, such as a list of customers.
  • Use tables to display information from a data set into rows and columns.

Anatomy

The data list consists of:

  • Caption (optional): describes the table.
  • List header: title for the row header.
  • List row: the data.

(Interactive) states

None.

Design properties

Typography

  • Caption: TheMix/xl/700
  • List header: TheSans/md/700
  • List row: TheSans/md/400

Color

  • Caption: text color black
  • List header: text color Grey/4, border color Grey/2
  • List row: text color Grey/4, border color Grey/2

Structure

Desktop

  • List header: padding 16px, margin-top 24px
  • List row: padding 16px

Mobile

  • List header: padding-top 12px, padding-bottom 4px, padding-left and padding-right 8px, margin-top 24px, border bottom 1px
  • List row: padding-top 4px, padding-bottom 12px, padding-left and padding-right 8px, border bottom 1px

Accessibility

  • Use data lists for layout.
  • A caption element is strongly encouraged. The summary attribute is deprecated in HTML5.

Content guidelines

  • Keep headers informative, descriptive and concise so that they can be read at a glance.
  • Ensure headers start in a capital letter and don’t end with commas, semicolons or full stops.
  • Ensure content starts in a capital letter and doesn’t include units of measurements.
  • Wrap instead of truncate content. This is because if row titles start with the same word, they’ll all appear the same when truncated.
  • Use decimals consistently.

Custom header widths

Use custom widths based on the expected length of the data under each corresponding column. By default the data list is full width, however the data list can be used with the grid to take up a desired amount of horizontal space on the page.

Best practices

Do’s

Data lists should:

  • Display a collection of structured data.
  • Have a logical row header.
  • Use a caption to describe a list in the same way you would use a heading. A caption helps users find, navigate and understand lists.
  • Align all headers and data to the left.

Don’ts

Data lists should:

  • Not be used when a more complex display of the data or interactions are required.
  • Not necessarily need captions when there is already a heading above the table that describes the data.
  • Not center the headers and data.

References

版本与发布记录

@gemeente-denhaag/descriptionlist 共发布 342 个版本,首次发布于 2022/02/10;过去 12 个月发布了 4 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
4.1.2latest2026/09/231 个月前
4.1.12026/07/273 个月前
4.1.02026/06/294 个月前
4.0.32026/05/185 个月前
4.0.22025/09/231.1 年前
4.0.12025/09/151.2 年前

关于 @gemeente-denhaag/descriptionlist 的常见问题

@gemeente-denhaag/descriptionlist 是什么?

A description list component

如何安装 @gemeente-denhaag/descriptionlist?

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

@gemeente-denhaag/descriptionlist 支持 TypeScript 吗?

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

@gemeente-denhaag/descriptionlist 支持 ESM 还是 CommonJS?

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

@gemeente-denhaag/descriptionlist 可以商用吗?

@gemeente-denhaag/descriptionlist 使用 EUPL-1.2 许可。声明的许可为 EUPL-1.2,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@gemeente-denhaag/descriptionlist 的下载量有多少?

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

@gemeente-denhaag/descriptionlist 还在维护吗?

最新版本 4.1.2 发布于 2026/09/23(1 个月前);至今共发布 342 个版本,其中过去 12 个月发布了 4 个;首次发布于 2022/02/10。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。