@directus-labs/super-header-interface

中文文档
1.2.0发布于 2025/05/09MITES Module近 30 天下载 4827

A super powerful header interface for Directus that allows you to create rich page headers with titles, subtitles, help information, and interactive actions. Perfect for enhancing the user experience with contextual information and quick access to common

此软件包已被标记为弃用

Merged into Directus core as the Header interface in v11.14

原始使用文档
文档目录11 节
  1. Overview Video
  2. Installation
  3. Usage
  4. Configuration Options
  5. Basic Settings
  6. Actions
  7. Field Types
  8. Translation Support
  9. Key Translation Strings
  10. Setting Up Help Content Translations
  11. Notes

Super Header Interface

Super Header Interface thumbnail

A super powerful header interface for Directus that allows you to create rich page headers with titles, subtitles, help information, and interactive actions. Perfect for enhancing the user experience with contextual information and quick access to common tasks.

Features

  • Customizable title and subtitle with dynamic field values
  • Optional icon and color theming
  • Rich text help content with HTML support
  • Configurable action buttons for navigation and DirectusFlow execution
  • Support for multiple actions with dropdown menu
  • Dynamic URL templates with field value interpolation
  • Comprehensive translation support for interface elements and help content

Overview Video

Overview Video

Installation

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

Usage

Screenshot of the Super Header Interface unexpanded

Screenshot of the Super Header Interface expanded

Screenshot of the Super Header Interface with actions open

The Super Header interface is designed to be used as a presentation field in your collection. It creates a prominent header section that can include:

  • A title with optional icon
  • A subtitle for additional context
  • Help information that can be toggled
  • Action buttons for navigation or running Flows

Configuration Options

Screenshot of the Super Header Interface configuration top

Screenshot of the Super Header Interface configuration bottom

Screenshot of the Super Header Interface action configuration

Basic Settings

  • Title - Main heading text. Supports field value templates (e.g., Item: {{ title }}). Only supports root-level fields.
  • Color - Choose a color for the title and icon
  • Icon - Select an icon to display next to the title
  • Subtitle - Secondary text below the title. Supports field value templates. Only supports root-level fields.
  • Help - Optional help content that supports HTML formatting
  • Help Display Mode - How would you like to display help content. Defaults to inline but you can show help content in a modal.
  • Enable Help Translations - Toggle to enable help content translations
  • Help Translations String - Define translation keys for help content for multi-language support

Actions

Configure buttons that appear in the header. Multiple actions will be displayed in a dropdown menu.

Each action can be configured with:

  • Label - Button text (supports translations)
  • Icon - Optional icon for the button
  • Type - Button style:
    • Primary
    • Secondary
    • Info
    • Success
    • Warning
    • Danger
  • Action Type - Choose between:
    • Link - Navigate to a URL (supports field value templates)
    • Flow - Execute a Directus Flow
  • URL - For link actions, specify the destination URL. Can be internal to Directus projects for navigation to pages like the Visual Editor - /visual/http://yoursite.com or can be fully external URLs - https://directus.io. You can include field values (e.g., https://example.com/items/{{ id }}) by using mustache syntax.
  • Flow - For flow actions, select the Flow to execute

Field Types

  • Type: alias
  • Local Types: presentation
  • Group: presentation

Translation Support

The Super Header Interface supports comprehensive translations:

  • Interface Elements - All UI elements (buttons, labels, dialogs) support translation via Directus's translation system
  • Action Labels - Action button labels can be translated using the system-input-translated-string interface
  • Help Content - Help text can be translated by enabling "Enable Help Translations" and using the "Help Translations String" field to define translation keys.

Key Translation Strings

Key translation strings used in the interface that are not part of the Directus core translations:

  • help
  • actions
  • reload_page

You'll want to add these strings to your Translation settings for full support.

Setting Up Help Content Translations

To provide multilingual help content in your Super Header interface, follow these steps:

  1. Enable Translation Support:

    • In the interface settings, toggle on "Enable Help Translations"
    • This will reveal the "Help Translations String" field
    • Note: When this is enabled, the regular "Help" field will be ignored
  2. Set Up Translation Keys:

    • In the "Help Translations String" field, provide a translation key like super_header_help_content
    • This key will be used to fetch the appropriate translated content
  3. Create HTML Content for Each Language:

    • Navigate to Settings → Translations in your Directus project
    • Create a new translation entry with the key you specified (e.g., super_header_help_content)
    • For each language you support, create an HTML content block with your help information
  4. Example Translation Setup:

    Key: super_header_help_content
    
    English:
    <h3>Getting Started</h3>
    <p>This section allows you to manage your content. Here are some tips:</p>
    <ul>
      <li>Use the <strong>action buttons</strong> to perform common tasks</li>
      <li>Click on items to edit their details</li>
    </ul>
    
    Spanish:
    <h3>Cómo Empezar</h3>
    <p>Esta sección le permite gestionar su contenido. Aquí hay algunos consejos:</p>
    <ul>
      <li>Utilice los <strong>botones de acción</strong> para realizar tareas comunes</li>
      <li>Haga clic en los elementos para editar sus detalles</li>
    </ul>
    
  5. Testing Your Translations:

    • Switch your Directus interface language to verify that the correct translated help content appears
    • The Super Header interface will automatically display the appropriate language based on the user's current Directus language setting

When properly configured, the help content will seamlessly adapt to each user's language preference, providing a truly multilingual experience for your interface.

Notes

  • Actions with type "Flow" require appropriate permissions to execute the selected Flow
  • URLs in link actions support dynamic values using mustache-style syntax ({{ field_name }}). Relational fields are now supported.

版本与发布记录

@directus-labs/super-header-interface 共发布 5 个版本,首次发布于 2025/01/10;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.2.0latest2025/05/091.5 年前
1.1.12025/02/221.7 年前
1.1.02025/01/301.8 年前
1.0.12025/01/141.8 年前
1.0.02025/01/101.8 年前

关于 @directus-labs/super-header-interface 的常见问题

@directus-labs/super-header-interface 是什么?

A super powerful header interface for Directus that allows you to create rich page headers with titles, subtitles, help information, and interactive actions. Perfect for enhancing the user experience with contextual information and quick access to common注意:该包已被作者标记为弃用——Merged into Directus core as the Header interface in v11.14

如何安装 @directus-labs/super-header-interface?

在项目目录运行 npm install @directus-labs/super-header-interface,或使用 pnpm add / yarn add / bun add。

@directus-labs/super-header-interface 支持 TypeScript 吗?

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

@directus-labs/super-header-interface 支持 ESM 还是 CommonJS?

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

@directus-labs/super-header-interface 可以商用吗?

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

@directus-labs/super-header-interface 的下载量有多少?

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

@directus-labs/super-header-interface 还在维护吗?

最新版本 1.2.0 发布于 2025/05/09(1.5 年前);至今共发布 5 个版本,其中过去 12 个月发布了 0 个;首次发布于 2025/01/10。作者已将其标记为弃用,新项目建议寻找替代方案。