@directus-labs/card-select-interfaces

中文文档
1.0.0发布于 2025/01/11MITES Module近 30 天下载 6304

A bundle of card-based selection interfaces for Directus

原始使用文档
文档目录5 节
  1. Installation
  2. Interfaces
  3. Radio Cards Interface
  4. Checkbox Cards Interface
  5. Configuration Options

Card Select Interfaces

Screenshot of the Card Select interfaces in a form

A bundle of card-based interfaces for Directus that provides selection options for both radio (single select) and checkbox (multiple select) inputs.

This bundle includes:

  • Radio Cards Interface
  • Checkbox Cards Interface

Installation

To install the extension, follow the Official Guide for installing extensions from the Marketplace or manually.

Interfaces

Radio Cards Interface

A card-based single selection interface that replaces the standard radio button input with visually appealing cards. Perfect for when you want to provide users with rich visual choices. Supports single selection.

Field Types: String, Integer, Float, Decimal, Big Integer

Radio Cards Interface Example

Radio Cards Interface Config

Checkbox Cards Interface

A card-based multiple selection interface that replaces standard checkboxes with interactive cards. Ideal for allowing users to select multiple options in a more engaging way. Supports multiple selections.

Field Types: JSON, CSV

Checkbox Cards Interface Example

Checkbox Cards Interface Config

Configuration Options

  • Choices - A list of card options with the following properties for each:
    • Text - Label to show in the studio interface
    • Value - Value to be stored in the database
    • Description - Optional description to display below the text label
    • Icon Type - Choose between:
      • Icon - Use a Directus system icon
      • SVG - Use custom SVG markup
      • Image - Use an uploaded image
    • Icon/SVG/Image - The actual icon content based on selected type
  • Grid Size - Number of columns in the grid layout (2-6 columns)
  • Enable Search - Toggle search functionality to filter cards by text

版本与发布记录

@directus-labs/card-select-interfaces 共发布 1 个版本,首次发布于 2025/01/11;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.0.0latest2025/01/111.8 年前

关于 @directus-labs/card-select-interfaces 的常见问题

@directus-labs/card-select-interfaces 是什么?

A bundle of card-based selection interfaces for Directus

如何安装 @directus-labs/card-select-interfaces?

在项目目录运行 npm install @directus-labs/card-select-interfaces,或使用 pnpm add / yarn add / bun add。

@directus-labs/card-select-interfaces 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/directus-labs__card-select-interfaces 是否存在。

@directus-labs/card-select-interfaces 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@directus-labs/card-select-interfaces 可以商用吗?

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

@directus-labs/card-select-interfaces 的下载量有多少?

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

@directus-labs/card-select-interfaces 还在维护吗?

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