@health.gov.au/health-design-system

中文文档
3.3.1发布于 2026/08/25GNU GENERAL PUBLIC LICENSE v3CommonJS近 30 天下载 1.4万

Design system for health.gov.au and related products.

原始使用文档
文档目录9 节
  1. Style Guide
  2. Dependencies
  3. Optional
  4. Installation
  5. Usage
  6. Command line tool
  7. Project structure
  8. Health Design System development
  9. HDS Starter Kit

Health Design System

The Health Design System (HDS) is a design system for Australian Government Department of Health, Disability and Ageing which is built on top of the Gold Design System.

Style Guide

View the Style Guide for documentation on how to use the Health Design System components.

The style guide is built using Fractal.

Dependencies

Optional

These are included in the javascript library folder for convenience.

Disable any of the optional libraries and related functionality by simply not including the library. You can find information on what functionality is provided by each library in the relevant component of the Style Guide.

Installation

Usage

Option 1: install as NPM package

The HDS can be added to a project as an npm package.

npm install @health.gov.au/health-design-system

You can generate a HTML version of Health Design System style guide in a project using the following cli command. The Style Guide will be located in the generated hds_style_guide directory and can be viewed by openning the ./style-guide/index.html file in a browser.

npx healthds build-guide

You can import the HDS core sass file into your project using @import "@health.gov.au/health-design-system/source/sass/all". This assumes the node_modules directory is included in you SASS build path.

JavaScript source files are available in @health.gov.au/health-design-system/health-design-system/source/js/src/.

Compiled version of CSS and JavaScript assets can be found in @health.gov.au/health-design-system/build/css/ and @health.gov.au/health-design-system/build/js/ respectively.

Option 2: Out of the box

Simply download and include the css and js files from the build folder. Include any library scripts.

Option 3: Build yourself

Clone, git submodule or download the repository.

Requires Node.js

Build using the built in Gulp tasks:

npm install and then run:

  • npm run gulp: Builds development and production ready CSS and JS files.
  • npm run gulp watch: Watches for changes and rebuilds.

Or you can import the core sass file into your pipeline @import "health-design-system/source/sass/all.scss"

Source javascript files are available in health-design-system/source/js/src.

Command line tool

A command line tool is available if you installed the HDS as a npm package.

CommandDescription
npx healthsd build-guideGenerates a statice HTML version of the HDS Style Guide in the current working directory. The Style Guide is create within the health-style-guide directory.
npx healthsd helpDisplays information on command usage.

Project structure

The following is a description of important directories used in the project.

DirectoryDescription
build/Compiled CSS and JavaScript files.
docs/Compiled HTML version of the HDS component library (aka. the Style Guide). Guide can be access by opening docs/index.html in a browser.
node_modules/Project dependencies added by NPM.
source/js/JavaScript source files. Include JavaScript libraries as well as custom code.
source/sass/SASS source files
source/sass/components/@gov.au/Overrides to styles provided by the DTA Design System should be placed in this directory. Overrides should be placed in a SASS partial file with the same name as the file in which the style is defined within the DTA Design System.
source/sass/components/@health/Styling for custom HDS components. These are components which are not a part of the DTA Design System.
style-guide/Source template and configuration files for components included in the HDS component library (aka. the Style Guide). The Style Guide is created using Fractal.

Health Design System development

Activate Git pre-commit hook.

npm start

Install dependencies:

npm install

Start Fractal development server. This will generate a local link to view the Style Guide. The style guide will be automatically updated when changes are made to the component source files. Note that to see any SASS related styling changes you will need to compile any SASS changes using either npm run gulp or npm run gulp:watch.

npm run fractal:start

To build a static HTML version of the Style Guide use the following command. After building the Style Guide can be accessed by opening docs/index.html file in a browser.

npm run fractal:build

The HDS uses Gulp to create compiled versions of the HDS CSS and JavaScript assets. The compiled files will be created in the build/ directory:

npm run gulp

HDS Starter Kit

setup.js is a file which is used to configure the HDS Starter kit. It is used to create a base fiel structure for instant development. More information about the HDS Starter kit can be found here: https://github.com/healthgovau/health-design-system-starter-kit

版本与发布记录

@health.gov.au/health-design-system 共发布 44 个版本,首次发布于 2019/11/29;过去 12 个月发布了 3 个版本。

版本发布日期距今
3.3.1latest2026/08/252 个月前
3.3.02026/08/202 个月前
3.2.02026/05/066 个月前
3.1.52025/07/081.4 年前
3.1.42025/05/301.5 年前
3.1.32025/05/211.5 年前

关于 @health.gov.au/health-design-system 的常见问题

@health.gov.au/health-design-system 是什么?

Design system for health.gov.au and related products.

如何安装 @health.gov.au/health-design-system?

在项目目录运行 npm install @health.gov.au/health-design-system,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 healthds、hdssetup,可以用 npx healthds 直接运行。

@health.gov.au/health-design-system 支持 TypeScript 吗?

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

@health.gov.au/health-design-system 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@health.gov.au/health-design-system 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=24.x。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@health.gov.au/health-design-system 可以商用吗?

@health.gov.au/health-design-system 使用 GNU GENERAL PUBLIC LICENSE v3 许可。声明的许可为 GNU GENERAL PUBLIC LICENSE v3,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@health.gov.au/health-design-system 的下载量有多少?

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

@health.gov.au/health-design-system 还在维护吗?

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